ホーム › Storage.FileSystem › LsnInvalid
LsnInvalid
関数ログシーケンス番号が無効値か判定する。
シグネチャ
// clfsw32.dll
#include <windows.h>
BOOLEAN LsnInvalid(
const CLS_LSN* plsn
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| plsn | CLS_LSN* | in |
戻り値の型: BOOLEAN
各言語での呼び出し定義
// clfsw32.dll
#include <windows.h>
BOOLEAN LsnInvalid(
const CLS_LSN* plsn
);[DllImport("clfsw32.dll", ExactSpelling = true)]
static extern byte LsnInvalid(
IntPtr plsn // CLS_LSN*
);<DllImport("clfsw32.dll", ExactSpelling:=True)>
Public Shared Function LsnInvalid(
plsn As IntPtr ' CLS_LSN*
) As Byte
End Function' plsn : CLS_LSN*
Declare PtrSafe Function LsnInvalid Lib "clfsw32" ( _
ByVal plsn As LongPtr) As Byte
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
LsnInvalid = ctypes.windll.clfsw32.LsnInvalid
LsnInvalid.restype = ctypes.c_byte
LsnInvalid.argtypes = [
ctypes.c_void_p, # plsn : CLS_LSN*
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('clfsw32.dll')
LsnInvalid = Fiddle::Function.new(
lib['LsnInvalid'],
[
Fiddle::TYPE_VOIDP, # plsn : CLS_LSN*
],
Fiddle::TYPE_CHAR)#[link(name = "clfsw32")]
extern "system" {
fn LsnInvalid(
plsn: *const CLS_LSN // CLS_LSN*
) -> u8;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("clfsw32.dll")]
public static extern byte LsnInvalid(IntPtr plsn);
"@
$api = Add-Type -MemberDefinition $sig -Name 'clfsw32_LsnInvalid' -Namespace Win32 -PassThru
# $api::LsnInvalid(plsn)#uselib "clfsw32.dll"
#func global LsnInvalid "LsnInvalid" sptr
; LsnInvalid varptr(plsn) ; 戻り値は stat
; plsn : CLS_LSN* -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。出力引数:
#uselib "clfsw32.dll" #cfunc global LsnInvalid "LsnInvalid" var ; res = LsnInvalid(plsn) ; plsn : CLS_LSN* -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。#uselib "clfsw32.dll" #cfunc global LsnInvalid "LsnInvalid" sptr ; res = LsnInvalid(varptr(plsn)) ; plsn : CLS_LSN* -> "sptr" ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。
出力引数:
; BOOLEAN LsnInvalid(CLS_LSN* plsn) #uselib "clfsw32.dll" #cfunc global LsnInvalid "LsnInvalid" var ; res = LsnInvalid(plsn) ; plsn : CLS_LSN* -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。; BOOLEAN LsnInvalid(CLS_LSN* plsn) #uselib "clfsw32.dll" #cfunc global LsnInvalid "LsnInvalid" intptr ; res = LsnInvalid(varptr(plsn)) ; plsn : CLS_LSN* -> "intptr" ; ※出力/バッファ引数はポインタ方式(token=intptr / 呼び出しは varptr(変数))。
import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
clfsw32 = windows.NewLazySystemDLL("clfsw32.dll")
procLsnInvalid = clfsw32.NewProc("LsnInvalid")
)
// plsn (CLS_LSN*)
r1, _, err := procLsnInvalid.Call(
uintptr(plsn),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // BOOLEANfunction LsnInvalid(
plsn: Pointer // CLS_LSN*
): ByteBool; stdcall;
external 'clfsw32.dll' name 'LsnInvalid';result := DllCall("clfsw32\LsnInvalid"
, "Ptr", plsn ; CLS_LSN*
, "Char") ; return: BOOLEAN●LsnInvalid(plsn) = DLL("clfsw32.dll", "byte LsnInvalid(void*)")
# 呼び出し: LsnInvalid(plsn)
# plsn : CLS_LSN* -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。