ホーム › Storage.Jet › JetComputeStats
JetComputeStats
関数テーブルのインデックス統計情報を再計算する。
シグネチャ
// ESENT.dll
#include <windows.h>
INT JetComputeStats(
JET_SESID sesid,
JET_TABLEID tableid
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| sesid | JET_SESID | in |
| tableid | JET_TABLEID | in |
戻り値の型: INT
各言語での呼び出し定義
// ESENT.dll
#include <windows.h>
INT JetComputeStats(
JET_SESID sesid,
JET_TABLEID tableid
);[DllImport("ESENT.dll", ExactSpelling = true)]
static extern int JetComputeStats(
UIntPtr sesid, // JET_SESID
UIntPtr tableid // JET_TABLEID
);<DllImport("ESENT.dll", ExactSpelling:=True)>
Public Shared Function JetComputeStats(
sesid As UIntPtr, ' JET_SESID
tableid As UIntPtr ' JET_TABLEID
) As Integer
End Function' sesid : JET_SESID
' tableid : JET_TABLEID
Declare PtrSafe Function JetComputeStats Lib "esent" ( _
ByVal sesid As LongPtr, _
ByVal tableid As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
JetComputeStats = ctypes.windll.esent.JetComputeStats
JetComputeStats.restype = ctypes.c_int
JetComputeStats.argtypes = [
ctypes.c_size_t, # sesid : JET_SESID
ctypes.c_size_t, # tableid : JET_TABLEID
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('ESENT.dll')
JetComputeStats = Fiddle::Function.new(
lib['JetComputeStats'],
[
Fiddle::TYPE_UINTPTR_T, # sesid : JET_SESID
Fiddle::TYPE_UINTPTR_T, # tableid : JET_TABLEID
],
Fiddle::TYPE_INT)#[link(name = "esent")]
extern "system" {
fn JetComputeStats(
sesid: usize, // JET_SESID
tableid: usize // JET_TABLEID
) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("ESENT.dll")]
public static extern int JetComputeStats(UIntPtr sesid, UIntPtr tableid);
"@
$api = Add-Type -MemberDefinition $sig -Name 'ESENT_JetComputeStats' -Namespace Win32 -PassThru
# $api::JetComputeStats(sesid, tableid)#uselib "ESENT.dll"
#func global JetComputeStats "JetComputeStats" sptr, sptr
; JetComputeStats sesid, tableid ; 戻り値は stat
; sesid : JET_SESID -> "sptr"
; tableid : JET_TABLEID -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "ESENT.dll"
#cfunc global JetComputeStats "JetComputeStats" sptr, sptr
; res = JetComputeStats(sesid, tableid)
; sesid : JET_SESID -> "sptr"
; tableid : JET_TABLEID -> "sptr"; INT JetComputeStats(JET_SESID sesid, JET_TABLEID tableid)
#uselib "ESENT.dll"
#cfunc global JetComputeStats "JetComputeStats" intptr, intptr
; res = JetComputeStats(sesid, tableid)
; sesid : JET_SESID -> "intptr"
; tableid : JET_TABLEID -> "intptr"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
esent = windows.NewLazySystemDLL("ESENT.dll")
procJetComputeStats = esent.NewProc("JetComputeStats")
)
// sesid (JET_SESID), tableid (JET_TABLEID)
r1, _, err := procJetComputeStats.Call(
uintptr(sesid),
uintptr(tableid),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // INTfunction JetComputeStats(
sesid: NativeUInt; // JET_SESID
tableid: NativeUInt // JET_TABLEID
): Integer; stdcall;
external 'ESENT.dll' name 'JetComputeStats';result := DllCall("ESENT\JetComputeStats"
, "UPtr", sesid ; JET_SESID
, "UPtr", tableid ; JET_TABLEID
, "Int") ; return: INT●JetComputeStats(sesid, tableid) = DLL("ESENT.dll", "int JetComputeStats(int, int)")
# 呼び出し: JetComputeStats(sesid, tableid)
# sesid : JET_SESID -> "int"
# tableid : JET_TABLEID -> "int"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。