ホーム › System.Ioctl › TXFS_START_RM_INFORMATION
TXFS_START_RM_INFORMATION
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| Flags | DWORD | 4 | +0 | +0 | リソースマネージャ起動時の動作を指定するフラグ。 |
| LogContainerSize | ULONGLONG | 8 | +8 | +8 | 各ログコンテナのサイズ(バイト)。 |
| LogContainerCountMin | DWORD | 4 | +16 | +16 | ログコンテナ数の下限。 |
| LogContainerCountMax | DWORD | 4 | +20 | +20 | ログコンテナ数の上限。 |
| LogGrowthIncrement | DWORD | 4 | +24 | +24 | ログ拡張時の増分(コンテナ数)。 |
| LogAutoShrinkPercentage | DWORD | 4 | +28 | +28 | ログ自動縮小をトリガする空き率のしきい値(%)。 |
| TmLogPathOffset | DWORD | 4 | +32 | +32 | 構造体先頭からTmLogPath文字列までのオフセット(バイト)。 |
| TmLogPathLength | WORD | 2 | +36 | +36 | トランザクションマネージャのログパスの長さ(バイト)。 |
| LoggingMode | WORD | 2 | +38 | +38 | ロギングモード(簡易/完全)を示す値。 |
| LogPathLength | WORD | 2 | +40 | +40 | リソースマネージャのログパスの長さ(バイト)。 |
| Reserved | WORD | 2 | +42 | +42 | 予約領域。0でなければならない。 |
| LogPath | WCHAR | 2 | +44 | +44 | リソースマネージャのログパスを格納するWCHARバッファの先頭。 |
各言語での定義
#include <windows.h>
// TXFS_START_RM_INFORMATION (x64 48 / x86 48 バイト)
typedef struct TXFS_START_RM_INFORMATION {
DWORD Flags;
ULONGLONG LogContainerSize;
DWORD LogContainerCountMin;
DWORD LogContainerCountMax;
DWORD LogGrowthIncrement;
DWORD LogAutoShrinkPercentage;
DWORD TmLogPathOffset;
WORD TmLogPathLength;
WORD LoggingMode;
WORD LogPathLength;
WORD Reserved;
WCHAR LogPath[1];
} TXFS_START_RM_INFORMATION;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct TXFS_START_RM_INFORMATION
{
public uint Flags;
public ulong LogContainerSize;
public uint LogContainerCountMin;
public uint LogContainerCountMax;
public uint LogGrowthIncrement;
public uint LogAutoShrinkPercentage;
public uint TmLogPathOffset;
public ushort TmLogPathLength;
public ushort LoggingMode;
public ushort LogPathLength;
public ushort Reserved;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1)] public string LogPath;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure TXFS_START_RM_INFORMATION
Public Flags As UInteger
Public LogContainerSize As ULong
Public LogContainerCountMin As UInteger
Public LogContainerCountMax As UInteger
Public LogGrowthIncrement As UInteger
Public LogAutoShrinkPercentage As UInteger
Public TmLogPathOffset As UInteger
Public TmLogPathLength As UShort
Public LoggingMode As UShort
Public LogPathLength As UShort
Public Reserved As UShort
<MarshalAs(UnmanagedType.ByValTStr, SizeConst:=1)> Public LogPath As String
End Structureimport ctypes
from ctypes import wintypes
class TXFS_START_RM_INFORMATION(ctypes.Structure):
_fields_ = [
("Flags", wintypes.DWORD),
("LogContainerSize", ctypes.c_ulonglong),
("LogContainerCountMin", wintypes.DWORD),
("LogContainerCountMax", wintypes.DWORD),
("LogGrowthIncrement", wintypes.DWORD),
("LogAutoShrinkPercentage", wintypes.DWORD),
("TmLogPathOffset", wintypes.DWORD),
("TmLogPathLength", ctypes.c_ushort),
("LoggingMode", ctypes.c_ushort),
("LogPathLength", ctypes.c_ushort),
("Reserved", ctypes.c_ushort),
("LogPath", ctypes.c_wchar * 1),
]#[repr(C)]
pub struct TXFS_START_RM_INFORMATION {
pub Flags: u32,
pub LogContainerSize: u64,
pub LogContainerCountMin: u32,
pub LogContainerCountMax: u32,
pub LogGrowthIncrement: u32,
pub LogAutoShrinkPercentage: u32,
pub TmLogPathOffset: u32,
pub TmLogPathLength: u16,
pub LoggingMode: u16,
pub LogPathLength: u16,
pub Reserved: u16,
pub LogPath: [u16; 1],
}import "golang.org/x/sys/windows"
type TXFS_START_RM_INFORMATION struct {
Flags uint32
LogContainerSize uint64
LogContainerCountMin uint32
LogContainerCountMax uint32
LogGrowthIncrement uint32
LogAutoShrinkPercentage uint32
TmLogPathOffset uint32
TmLogPathLength uint16
LoggingMode uint16
LogPathLength uint16
Reserved uint16
LogPath [1]uint16
}type
TXFS_START_RM_INFORMATION = record
Flags: DWORD;
LogContainerSize: UInt64;
LogContainerCountMin: DWORD;
LogContainerCountMax: DWORD;
LogGrowthIncrement: DWORD;
LogAutoShrinkPercentage: DWORD;
TmLogPathOffset: DWORD;
TmLogPathLength: Word;
LoggingMode: Word;
LogPathLength: Word;
Reserved: Word;
LogPath: array[0..0] of WideChar;
end;const TXFS_START_RM_INFORMATION = extern struct {
Flags: u32,
LogContainerSize: u64,
LogContainerCountMin: u32,
LogContainerCountMax: u32,
LogGrowthIncrement: u32,
LogAutoShrinkPercentage: u32,
TmLogPathOffset: u32,
TmLogPathLength: u16,
LoggingMode: u16,
LogPathLength: u16,
Reserved: u16,
LogPath: [1]u16,
};type
TXFS_START_RM_INFORMATION {.bycopy.} = object
Flags: uint32
LogContainerSize: uint64
LogContainerCountMin: uint32
LogContainerCountMax: uint32
LogGrowthIncrement: uint32
LogAutoShrinkPercentage: uint32
TmLogPathOffset: uint32
TmLogPathLength: uint16
LoggingMode: uint16
LogPathLength: uint16
Reserved: uint16
LogPath: array[1, uint16]struct TXFS_START_RM_INFORMATION
{
uint Flags;
ulong LogContainerSize;
uint LogContainerCountMin;
uint LogContainerCountMax;
uint LogGrowthIncrement;
uint LogAutoShrinkPercentage;
uint TmLogPathOffset;
ushort TmLogPathLength;
ushort LoggingMode;
ushort LogPathLength;
ushort Reserved;
wchar[1] LogPath;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; TXFS_START_RM_INFORMATION サイズ: 48 バイト(x64)
dim st, 12 ; 4byte整数×12(構造体サイズ 48 / 4 切り上げ)
; Flags : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; LogContainerSize : ULONGLONG (+8, 8byte) qpoke st,8,値 / qpeek(st,8) ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; LogContainerCountMin : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; LogContainerCountMax : DWORD (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; LogGrowthIncrement : DWORD (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; LogAutoShrinkPercentage : DWORD (+28, 4byte) st.7 = 値 / 値 = st.7 (lpoke/lpeek も可)
; TmLogPathOffset : DWORD (+32, 4byte) st.8 = 値 / 値 = st.8 (lpoke/lpeek も可)
; TmLogPathLength : WORD (+36, 2byte) wpoke st,36,値 / 値 = wpeek(st,36)
; LoggingMode : WORD (+38, 2byte) wpoke st,38,値 / 値 = wpeek(st,38)
; LogPathLength : WORD (+40, 2byte) wpoke st,40,値 / 値 = wpeek(st,40)
; Reserved : WORD (+42, 2byte) wpoke st,42,値 / 値 = wpeek(st,42)
; LogPath : WCHAR (+44, 2byte) varptr(st)+44 を基点に操作(2byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global TXFS_START_RM_INFORMATION
#field int Flags
#field int64 LogContainerSize
#field int LogContainerCountMin
#field int LogContainerCountMax
#field int LogGrowthIncrement
#field int LogAutoShrinkPercentage
#field int TmLogPathOffset
#field short TmLogPathLength
#field short LoggingMode
#field short LogPathLength
#field short Reserved
#field wchar LogPath 1
#endstruct
stdim st, TXFS_START_RM_INFORMATION ; NSTRUCT 変数を確保
st->Flags = 100
mes "Flags=" + st->Flags