ホーム › Storage.FileSystem › TxfLogRecordGetGenericType
TxfLogRecordGetGenericType
関数TxFログレコードの汎用種別と仮想クロックを取得する。
シグネチャ
// txfw32.dll
#include <windows.h>
BOOL TxfLogRecordGetGenericType(
void* RecordBuffer,
DWORD RecordBufferLengthInBytes,
DWORD* GenericType,
LONGLONG* VirtualClock // optional
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| RecordBuffer | void* | in |
| RecordBufferLengthInBytes | DWORD | in |
| GenericType | DWORD* | out |
| VirtualClock | LONGLONG* | outoptional |
戻り値の型: BOOL
各言語での呼び出し定義
// txfw32.dll
#include <windows.h>
BOOL TxfLogRecordGetGenericType(
void* RecordBuffer,
DWORD RecordBufferLengthInBytes,
DWORD* GenericType,
LONGLONG* VirtualClock // optional
);[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("txfw32.dll", ExactSpelling = true)]
static extern bool TxfLogRecordGetGenericType(
IntPtr RecordBuffer, // void*
uint RecordBufferLengthInBytes, // DWORD
out uint GenericType, // DWORD* out
IntPtr VirtualClock // LONGLONG* optional, out
);<DllImport("txfw32.dll", ExactSpelling:=True)>
Public Shared Function TxfLogRecordGetGenericType(
RecordBuffer As IntPtr, ' void*
RecordBufferLengthInBytes As UInteger, ' DWORD
<Out> ByRef GenericType As UInteger, ' DWORD* out
VirtualClock As IntPtr ' LONGLONG* optional, out
) As Boolean
End Function' RecordBuffer : void*
' RecordBufferLengthInBytes : DWORD
' GenericType : DWORD* out
' VirtualClock : LONGLONG* optional, out
Declare PtrSafe Function TxfLogRecordGetGenericType Lib "txfw32" ( _
ByVal RecordBuffer As LongPtr, _
ByVal RecordBufferLengthInBytes As Long, _
ByRef GenericType As Long, _
ByVal VirtualClock As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
TxfLogRecordGetGenericType = ctypes.windll.txfw32.TxfLogRecordGetGenericType
TxfLogRecordGetGenericType.restype = wintypes.BOOL
TxfLogRecordGetGenericType.argtypes = [
ctypes.POINTER(None), # RecordBuffer : void*
wintypes.DWORD, # RecordBufferLengthInBytes : DWORD
ctypes.POINTER(wintypes.DWORD), # GenericType : DWORD* out
ctypes.POINTER(ctypes.c_longlong), # VirtualClock : LONGLONG* optional, out
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('txfw32.dll')
TxfLogRecordGetGenericType = Fiddle::Function.new(
lib['TxfLogRecordGetGenericType'],
[
Fiddle::TYPE_VOIDP, # RecordBuffer : void*
-Fiddle::TYPE_INT, # RecordBufferLengthInBytes : DWORD
Fiddle::TYPE_VOIDP, # GenericType : DWORD* out
Fiddle::TYPE_VOIDP, # VirtualClock : LONGLONG* optional, out
],
Fiddle::TYPE_INT)#[link(name = "txfw32")]
extern "system" {
fn TxfLogRecordGetGenericType(
RecordBuffer: *mut (), // void*
RecordBufferLengthInBytes: u32, // DWORD
GenericType: *mut u32, // DWORD* out
VirtualClock: *mut i64 // LONGLONG* optional, out
) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("txfw32.dll")]
public static extern bool TxfLogRecordGetGenericType(IntPtr RecordBuffer, uint RecordBufferLengthInBytes, out uint GenericType, IntPtr VirtualClock);
"@
$api = Add-Type -MemberDefinition $sig -Name 'txfw32_TxfLogRecordGetGenericType' -Namespace Win32 -PassThru
# $api::TxfLogRecordGetGenericType(RecordBuffer, RecordBufferLengthInBytes, GenericType, VirtualClock)#uselib "txfw32.dll"
#func global TxfLogRecordGetGenericType "TxfLogRecordGetGenericType" sptr, sptr, sptr, sptr
; TxfLogRecordGetGenericType RecordBuffer, RecordBufferLengthInBytes, varptr(GenericType), varptr(VirtualClock) ; 戻り値は stat
; RecordBuffer : void* -> "sptr"
; RecordBufferLengthInBytes : DWORD -> "sptr"
; GenericType : DWORD* out -> "sptr"
; VirtualClock : LONGLONG* optional, out -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。出力引数:
#uselib "txfw32.dll" #cfunc global TxfLogRecordGetGenericType "TxfLogRecordGetGenericType" sptr, int, var, var ; res = TxfLogRecordGetGenericType(RecordBuffer, RecordBufferLengthInBytes, GenericType, VirtualClock) ; RecordBuffer : void* -> "sptr" ; RecordBufferLengthInBytes : DWORD -> "int" ; GenericType : DWORD* out -> "var" ; VirtualClock : LONGLONG* optional, out -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。#uselib "txfw32.dll" #cfunc global TxfLogRecordGetGenericType "TxfLogRecordGetGenericType" sptr, int, sptr, sptr ; res = TxfLogRecordGetGenericType(RecordBuffer, RecordBufferLengthInBytes, varptr(GenericType), varptr(VirtualClock)) ; RecordBuffer : void* -> "sptr" ; RecordBufferLengthInBytes : DWORD -> "int" ; GenericType : DWORD* out -> "sptr" ; VirtualClock : LONGLONG* optional, out -> "sptr" ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。
出力引数:
; BOOL TxfLogRecordGetGenericType(void* RecordBuffer, DWORD RecordBufferLengthInBytes, DWORD* GenericType, LONGLONG* VirtualClock) #uselib "txfw32.dll" #cfunc global TxfLogRecordGetGenericType "TxfLogRecordGetGenericType" intptr, int, var, var ; res = TxfLogRecordGetGenericType(RecordBuffer, RecordBufferLengthInBytes, GenericType, VirtualClock) ; RecordBuffer : void* -> "intptr" ; RecordBufferLengthInBytes : DWORD -> "int" ; GenericType : DWORD* out -> "var" ; VirtualClock : LONGLONG* optional, out -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。; BOOL TxfLogRecordGetGenericType(void* RecordBuffer, DWORD RecordBufferLengthInBytes, DWORD* GenericType, LONGLONG* VirtualClock) #uselib "txfw32.dll" #cfunc global TxfLogRecordGetGenericType "TxfLogRecordGetGenericType" intptr, int, intptr, intptr ; res = TxfLogRecordGetGenericType(RecordBuffer, RecordBufferLengthInBytes, varptr(GenericType), varptr(VirtualClock)) ; RecordBuffer : void* -> "intptr" ; RecordBufferLengthInBytes : DWORD -> "int" ; GenericType : DWORD* out -> "intptr" ; VirtualClock : LONGLONG* optional, out -> "intptr" ; ※出力/バッファ引数はポインタ方式(token=intptr / 呼び出しは varptr(変数))。
import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
txfw32 = windows.NewLazySystemDLL("txfw32.dll")
procTxfLogRecordGetGenericType = txfw32.NewProc("TxfLogRecordGetGenericType")
)
// RecordBuffer (void*), RecordBufferLengthInBytes (DWORD), GenericType (DWORD* out), VirtualClock (LONGLONG* optional, out)
r1, _, err := procTxfLogRecordGetGenericType.Call(
uintptr(RecordBuffer),
uintptr(RecordBufferLengthInBytes),
uintptr(GenericType),
uintptr(VirtualClock),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // BOOLfunction TxfLogRecordGetGenericType(
RecordBuffer: Pointer; // void*
RecordBufferLengthInBytes: DWORD; // DWORD
GenericType: Pointer; // DWORD* out
VirtualClock: Pointer // LONGLONG* optional, out
): BOOL; stdcall;
external 'txfw32.dll' name 'TxfLogRecordGetGenericType';result := DllCall("txfw32\TxfLogRecordGetGenericType"
, "Ptr", RecordBuffer ; void*
, "UInt", RecordBufferLengthInBytes ; DWORD
, "Ptr", GenericType ; DWORD* out
, "Ptr", VirtualClock ; LONGLONG* optional, out
, "Int") ; return: BOOL●TxfLogRecordGetGenericType(RecordBuffer, RecordBufferLengthInBytes, GenericType, VirtualClock) = DLL("txfw32.dll", "bool TxfLogRecordGetGenericType(void*, dword, void*, void*)")
# 呼び出し: TxfLogRecordGetGenericType(RecordBuffer, RecordBufferLengthInBytes, GenericType, VirtualClock)
# RecordBuffer : void* -> "void*"
# RecordBufferLengthInBytes : DWORD -> "dword"
# GenericType : DWORD* out -> "void*"
# VirtualClock : LONGLONG* optional, out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。