ホーム › System.SystemServices › TRANSACTION_LIST_INFORMATION
TRANSACTION_LIST_INFORMATION
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| NumberOfTransactions | DWORD | 4 | +0 | +0 | TransactionInformation配列に含まれるトランザクション数。 |
| TransactionInformation | TRANSACTION_LIST_ENTRY | 16 | +4 | +4 | トランザクション一覧を表す可変長エントリ配列の先頭。 |
各言語での定義
#include <windows.h>
// TRANSACTION_LIST_ENTRY (x64 16 / x86 16 バイト)
typedef struct TRANSACTION_LIST_ENTRY {
GUID UOW;
} TRANSACTION_LIST_ENTRY;
// TRANSACTION_LIST_INFORMATION (x64 20 / x86 20 バイト)
typedef struct TRANSACTION_LIST_INFORMATION {
DWORD NumberOfTransactions;
TRANSACTION_LIST_ENTRY TransactionInformation[1];
} TRANSACTION_LIST_INFORMATION;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct TRANSACTION_LIST_ENTRY
{
public Guid UOW;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct TRANSACTION_LIST_INFORMATION
{
public uint NumberOfTransactions;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 1)] public TRANSACTION_LIST_ENTRY[] TransactionInformation;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure TRANSACTION_LIST_ENTRY
Public UOW As Guid
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure TRANSACTION_LIST_INFORMATION
Public NumberOfTransactions As UInteger
<MarshalAs(UnmanagedType.ByValArray, SizeConst:=1)> Public TransactionInformation() As TRANSACTION_LIST_ENTRY
End Structureimport ctypes
from ctypes import wintypes
class TRANSACTION_LIST_ENTRY(ctypes.Structure):
_fields_ = [
("UOW", GUID),
]
class TRANSACTION_LIST_INFORMATION(ctypes.Structure):
_fields_ = [
("NumberOfTransactions", wintypes.DWORD),
("TransactionInformation", TRANSACTION_LIST_ENTRY * 1),
]#[repr(C)]
pub struct TRANSACTION_LIST_ENTRY {
pub UOW: GUID,
}
#[repr(C)]
pub struct TRANSACTION_LIST_INFORMATION {
pub NumberOfTransactions: u32,
pub TransactionInformation: [TRANSACTION_LIST_ENTRY; 1],
}import "golang.org/x/sys/windows"
type TRANSACTION_LIST_ENTRY struct {
UOW windows.GUID
}
type TRANSACTION_LIST_INFORMATION struct {
NumberOfTransactions uint32
TransactionInformation [1]TRANSACTION_LIST_ENTRY
}type
TRANSACTION_LIST_ENTRY = record
UOW: TGUID;
end;
TRANSACTION_LIST_INFORMATION = record
NumberOfTransactions: DWORD;
TransactionInformation: array[0..0] of TRANSACTION_LIST_ENTRY;
end;const TRANSACTION_LIST_ENTRY = extern struct {
UOW: GUID,
};
const TRANSACTION_LIST_INFORMATION = extern struct {
NumberOfTransactions: u32,
TransactionInformation: [1]TRANSACTION_LIST_ENTRY,
};type
TRANSACTION_LIST_ENTRY {.bycopy.} = object
UOW: GUID
TRANSACTION_LIST_INFORMATION {.bycopy.} = object
NumberOfTransactions: uint32
TransactionInformation: array[1, TRANSACTION_LIST_ENTRY]struct TRANSACTION_LIST_ENTRY
{
GUID UOW;
}
struct TRANSACTION_LIST_INFORMATION
{
uint NumberOfTransactions;
TRANSACTION_LIST_ENTRY[1] TransactionInformation;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; TRANSACTION_LIST_INFORMATION サイズ: 20 バイト(x64)
dim st, 5 ; 4byte整数×5(構造体サイズ 20 / 4 切り上げ)
; NumberOfTransactions : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; TransactionInformation : TRANSACTION_LIST_ENTRY (+4, 16byte) varptr(st)+4 を基点に操作(16byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
; ※GUID・入れ子構造体はデフォルト型でないため、依存する #defstruct を先に定義(下記に同梱)。
#defstruct global GUID, pack=1
#field int Data1
#field short Data2
#field short Data3
#field byte Data4 8
#endstruct
#defstruct global TRANSACTION_LIST_ENTRY
#field GUID UOW
#endstruct
#defstruct global TRANSACTION_LIST_INFORMATION
#field int NumberOfTransactions
#field TRANSACTION_LIST_ENTRY TransactionInformation 1
#endstruct
stdim st, TRANSACTION_LIST_INFORMATION ; NSTRUCT 変数を確保
st->NumberOfTransactions = 100
mes "NumberOfTransactions=" + st->NumberOfTransactions