Win32 API 日本語リファレンス
ホームSystem.Ioctl › TXFS_LIST_TRANSACTIONS_ENTRY

TXFS_LIST_TRANSACTIONS_ENTRY

構造体
サイズx64: 40 バイト / x86: 40 バイト

サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。

フィールド

フィールドサイズx64x86説明
TransactionIdGUID16+0+0トランザクションを識別するGUID。
TransactionStateDWORD4+16+16トランザクションの状態を示す値。
Reserved1DWORD4+20+20予約領域その1。
Reserved2DWORD4+24+24予約領域その2。
Reserved3LONGLONG8+32+32予約領域その3。

各言語での定義

#include <windows.h>

// TXFS_LIST_TRANSACTIONS_ENTRY  (x64 40 / x86 40 バイト)
typedef struct TXFS_LIST_TRANSACTIONS_ENTRY {
    GUID TransactionId;
    DWORD TransactionState;
    DWORD Reserved1;
    DWORD Reserved2;
    LONGLONG Reserved3;
} TXFS_LIST_TRANSACTIONS_ENTRY;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct TXFS_LIST_TRANSACTIONS_ENTRY
{
    public Guid TransactionId;
    public uint TransactionState;
    public uint Reserved1;
    public uint Reserved2;
    public long Reserved3;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure TXFS_LIST_TRANSACTIONS_ENTRY
    Public TransactionId As Guid
    Public TransactionState As UInteger
    Public Reserved1 As UInteger
    Public Reserved2 As UInteger
    Public Reserved3 As Long
End Structure
import ctypes
from ctypes import wintypes

class TXFS_LIST_TRANSACTIONS_ENTRY(ctypes.Structure):
    _fields_ = [
        ("TransactionId", GUID),
        ("TransactionState", wintypes.DWORD),
        ("Reserved1", wintypes.DWORD),
        ("Reserved2", wintypes.DWORD),
        ("Reserved3", ctypes.c_longlong),
    ]
#[repr(C)]
pub struct TXFS_LIST_TRANSACTIONS_ENTRY {
    pub TransactionId: GUID,
    pub TransactionState: u32,
    pub Reserved1: u32,
    pub Reserved2: u32,
    pub Reserved3: i64,
}
import "golang.org/x/sys/windows"

type TXFS_LIST_TRANSACTIONS_ENTRY struct {
	TransactionId windows.GUID
	TransactionState uint32
	Reserved1 uint32
	Reserved2 uint32
	Reserved3 int64
}
type
  TXFS_LIST_TRANSACTIONS_ENTRY = record
    TransactionId: TGUID;
    TransactionState: DWORD;
    Reserved1: DWORD;
    Reserved2: DWORD;
    Reserved3: Int64;
  end;
const TXFS_LIST_TRANSACTIONS_ENTRY = extern struct {
    TransactionId: GUID,
    TransactionState: u32,
    Reserved1: u32,
    Reserved2: u32,
    Reserved3: i64,
};
type
  TXFS_LIST_TRANSACTIONS_ENTRY {.bycopy.} = object
    TransactionId: GUID
    TransactionState: uint32
    Reserved1: uint32
    Reserved2: uint32
    Reserved3: int64
struct TXFS_LIST_TRANSACTIONS_ENTRY
{
    GUID TransactionId;
    uint TransactionState;
    uint Reserved1;
    uint Reserved2;
    long Reserved3;
}

HSP用 定義

HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。

; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; TXFS_LIST_TRANSACTIONS_ENTRY サイズ: 40 バイト(x64)
dim st, 10    ; 4byte整数×10(構造体サイズ 40 / 4 切り上げ)
; TransactionId : GUID (+0, 16byte)  varptr(st)+0 を基点に操作(16byte:入れ子/配列)
; TransactionState : DWORD (+16, 4byte)  st.4 = 値  /  値 = st.4   (lpoke/lpeek も可)
; Reserved1 : DWORD (+20, 4byte)  st.5 = 値  /  値 = st.5   (lpoke/lpeek も可)
; Reserved2 : DWORD (+24, 4byte)  st.6 = 値  /  値 = st.6   (lpoke/lpeek も可)
; Reserved3 : LONGLONG (+32, 8byte)  qpoke st,32,値 / qpeek(st,32)  ※IronHSPのみ。3.7/3.8は lpoke st,32,下位 : lpoke st,36,上位
; ※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 TXFS_LIST_TRANSACTIONS_ENTRY
    #field GUID TransactionId
    #field int TransactionState
    #field int Reserved1
    #field int Reserved2
    #field int64 Reserved3
#endstruct

stdim st, TXFS_LIST_TRANSACTIONS_ENTRY        ; NSTRUCT 変数を確保
st->TransactionState = 100
mes "TransactionState=" + st->TransactionState