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