ホーム › Storage.Jet › JetGetLogInfoW
JetGetLogInfoW
関数外部バックアップ対象のログファイル一覧を取得する(Unicode版)。
シグネチャ
// ESENT.dll (Unicode / -W)
#include <windows.h>
INT JetGetLogInfoW(
WORD* szzLogs, // optional
DWORD cbMax,
DWORD* pcbActual // optional
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| szzLogs | WORD* | outoptional |
| cbMax | DWORD | in |
| pcbActual | DWORD* | outoptional |
戻り値の型: INT
各言語での呼び出し定義
// ESENT.dll (Unicode / -W)
#include <windows.h>
INT JetGetLogInfoW(
WORD* szzLogs, // optional
DWORD cbMax,
DWORD* pcbActual // optional
);[DllImport("ESENT.dll", CharSet = CharSet.Unicode, ExactSpelling = true)]
static extern int JetGetLogInfoW(
IntPtr szzLogs, // WORD* optional, out
uint cbMax, // DWORD
IntPtr pcbActual // DWORD* optional, out
);<DllImport("ESENT.dll", CharSet:=CharSet.Unicode, ExactSpelling:=True)>
Public Shared Function JetGetLogInfoW(
szzLogs As IntPtr, ' WORD* optional, out
cbMax As UInteger, ' DWORD
pcbActual As IntPtr ' DWORD* optional, out
) As Integer
End Function' szzLogs : WORD* optional, out
' cbMax : DWORD
' pcbActual : DWORD* optional, out
Declare PtrSafe Function JetGetLogInfoW Lib "esent" ( _
ByVal szzLogs As LongPtr, _
ByVal cbMax As Long, _
ByVal pcbActual As LongPtr) As Long
' Unicode(W): 文字列は ByVal As LongPtr とし StrPtr(unicodeStr) を渡す
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
JetGetLogInfoW = ctypes.windll.esent.JetGetLogInfoW
JetGetLogInfoW.restype = ctypes.c_int
JetGetLogInfoW.argtypes = [
ctypes.POINTER(ctypes.c_ushort), # szzLogs : WORD* optional, out
wintypes.DWORD, # cbMax : DWORD
ctypes.POINTER(wintypes.DWORD), # pcbActual : DWORD* optional, out
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('ESENT.dll')
JetGetLogInfoW = Fiddle::Function.new(
lib['JetGetLogInfoW'],
[
Fiddle::TYPE_VOIDP, # szzLogs : WORD* optional, out
-Fiddle::TYPE_INT, # cbMax : DWORD
Fiddle::TYPE_VOIDP, # pcbActual : DWORD* optional, out
],
Fiddle::TYPE_INT)
# Wide strings: pass str.encode("UTF-16LE") + "\x00\x00"#[link(name = "esent")]
extern "system" {
fn JetGetLogInfoW(
szzLogs: *mut u16, // WORD* optional, out
cbMax: u32, // DWORD
pcbActual: *mut u32 // DWORD* optional, out
) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("ESENT.dll", CharSet = CharSet.Unicode)]
public static extern int JetGetLogInfoW(IntPtr szzLogs, uint cbMax, IntPtr pcbActual);
"@
$api = Add-Type -MemberDefinition $sig -Name 'ESENT_JetGetLogInfoW' -Namespace Win32 -PassThru
# $api::JetGetLogInfoW(szzLogs, cbMax, pcbActual)#uselib "ESENT.dll"
#func global JetGetLogInfoW "JetGetLogInfoW" wptr, wptr, wptr
; JetGetLogInfoW varptr(szzLogs), cbMax, varptr(pcbActual) ; 戻り値は stat
; szzLogs : WORD* optional, out -> "wptr"
; cbMax : DWORD -> "wptr"
; pcbActual : DWORD* optional, out -> "wptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。出力引数:
#uselib "ESENT.dll" #cfunc global JetGetLogInfoW "JetGetLogInfoW" var, int, var ; res = JetGetLogInfoW(szzLogs, cbMax, pcbActual) ; szzLogs : WORD* optional, out -> "var" ; cbMax : DWORD -> "int" ; pcbActual : DWORD* optional, out -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。#uselib "ESENT.dll" #cfunc global JetGetLogInfoW "JetGetLogInfoW" sptr, int, sptr ; res = JetGetLogInfoW(varptr(szzLogs), cbMax, varptr(pcbActual)) ; szzLogs : WORD* optional, out -> "sptr" ; cbMax : DWORD -> "int" ; pcbActual : DWORD* optional, out -> "sptr" ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。
出力引数:
; INT JetGetLogInfoW(WORD* szzLogs, DWORD cbMax, DWORD* pcbActual) #uselib "ESENT.dll" #cfunc global JetGetLogInfoW "JetGetLogInfoW" var, int, var ; res = JetGetLogInfoW(szzLogs, cbMax, pcbActual) ; szzLogs : WORD* optional, out -> "var" ; cbMax : DWORD -> "int" ; pcbActual : DWORD* optional, out -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。; INT JetGetLogInfoW(WORD* szzLogs, DWORD cbMax, DWORD* pcbActual) #uselib "ESENT.dll" #cfunc global JetGetLogInfoW "JetGetLogInfoW" intptr, int, intptr ; res = JetGetLogInfoW(varptr(szzLogs), cbMax, varptr(pcbActual)) ; szzLogs : WORD* optional, out -> "intptr" ; cbMax : DWORD -> "int" ; pcbActual : DWORD* optional, out -> "intptr" ; ※出力/バッファ引数はポインタ方式(token=intptr / 呼び出しは varptr(変数))。
import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
esent = windows.NewLazySystemDLL("ESENT.dll")
procJetGetLogInfoW = esent.NewProc("JetGetLogInfoW")
)
// szzLogs (WORD* optional, out), cbMax (DWORD), pcbActual (DWORD* optional, out)
r1, _, err := procJetGetLogInfoW.Call(
uintptr(szzLogs),
uintptr(cbMax),
uintptr(pcbActual),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // INTfunction JetGetLogInfoW(
szzLogs: Pointer; // WORD* optional, out
cbMax: DWORD; // DWORD
pcbActual: Pointer // DWORD* optional, out
): Integer; stdcall;
external 'ESENT.dll' name 'JetGetLogInfoW';result := DllCall("ESENT\JetGetLogInfoW"
, "Ptr", szzLogs ; WORD* optional, out
, "UInt", cbMax ; DWORD
, "Ptr", pcbActual ; DWORD* optional, out
, "Int") ; return: INT●JetGetLogInfoW(szzLogs, cbMax, pcbActual) = DLL("ESENT.dll", "int JetGetLogInfoW(void*, dword, void*)")
# 呼び出し: JetGetLogInfoW(szzLogs, cbMax, pcbActual)
# szzLogs : WORD* optional, out -> "void*"
# cbMax : DWORD -> "dword"
# pcbActual : DWORD* optional, out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。
# ※-W(Unicode)関数。なでしこ1はANSIのため -A 版の利用を推奨。