Win32 API 日本語リファレンス
ホームStorage.Jet › JetTruncateLog

JetTruncateLog

関数
バックアップ済みのトランザクションログを切り捨てる。
DLLESENT.dll呼出規約winapi

シグネチャ

// ESENT.dll
#include <windows.h>

INT JetTruncateLog(void);

パラメーターなし。戻り値: INT

各言語での呼び出し定義

// ESENT.dll
#include <windows.h>

INT JetTruncateLog(void);
[DllImport("ESENT.dll", ExactSpelling = true)]
static extern int JetTruncateLog();
<DllImport("ESENT.dll", ExactSpelling:=True)>
Public Shared Function JetTruncateLog() As Integer
End Function
Declare PtrSafe Function JetTruncateLog Lib "esent" () As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

JetTruncateLog = ctypes.windll.esent.JetTruncateLog
JetTruncateLog.restype = ctypes.c_int
JetTruncateLog.argtypes = []
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('ESENT.dll')
JetTruncateLog = Fiddle::Function.new(
  lib['JetTruncateLog'],
  [],
  Fiddle::TYPE_INT)
#[link(name = "esent")]
extern "system" {
    fn JetTruncateLog() -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("ESENT.dll")]
public static extern int JetTruncateLog();
"@
$api = Add-Type -MemberDefinition $sig -Name 'ESENT_JetTruncateLog' -Namespace Win32 -PassThru
# $api::JetTruncateLog()
#uselib "ESENT.dll"
#func global JetTruncateLog "JetTruncateLog"
; JetTruncateLog   ; 戻り値は stat
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
#uselib "ESENT.dll"
#cfunc global JetTruncateLog "JetTruncateLog"
; res = JetTruncateLog()
; INT JetTruncateLog()
#uselib "ESENT.dll"
#cfunc global JetTruncateLog "JetTruncateLog"
; res = JetTruncateLog()
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	esent = windows.NewLazySystemDLL("ESENT.dll")
	procJetTruncateLog = esent.NewProc("JetTruncateLog")
)

r1, _, err := procJetTruncateLog.Call()
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // INT
function JetTruncateLog: Integer; stdcall;
  external 'ESENT.dll' name 'JetTruncateLog';
result := DllCall("ESENT\JetTruncateLog", "Int")
●JetTruncateLog() = DLL("ESENT.dll", "int JetTruncateLog()")
# 呼び出し: JetTruncateLog()
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。