ホーム › System.Diagnostics.Etw › TRACE_LOGFILE_HEADER
TRACE_LOGFILE_HEADER
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| BufferSize | DWORD | 4 | +0 | +0 | トレースバッファのバイトサイズを示す。 |
| Anonymous1 | _Anonymous1_e__Union | 8/4 | +8 | +4 | OS バージョン情報を保持する無名共用体。 |
| ProviderVersion | DWORD | 4 | +16 | +8 | プロバイダ(ログ生成元)のバージョンを示す。 |
| NumberOfProcessors | DWORD | 4 | +20 | +12 | プロセッサ数を示す。 |
| EndTime | LONGLONG | 8 | +24 | +16 | トレースの終了時刻を示す。 |
| TimerResolution | DWORD | 4 | +32 | +24 | 高分解能タイマーの分解能を示す。 |
| MaximumFileSize | DWORD | 4 | +36 | +28 | ログファイルの最大サイズ(MB)を示す。 |
| LogFileMode | DWORD | 4 | +40 | +32 | ログファイルのモード(循環/追記等)を示すフラグ。 |
| BuffersWritten | DWORD | 4 | +44 | +36 | 書き込まれたバッファの数を示す。 |
| Anonymous2 | _Anonymous2_e__Union | 16 | +48 | +40 | ログファイルのバージョンや GUID を保持する無名共用体。 |
| LoggerName | LPWSTR | 8/4 | +64 | +56 | ロガーセッション名を示す文字列。 |
| LogFileName | LPWSTR | 8/4 | +72 | +60 | ログファイル名を示す文字列。 |
| TimeZone | TIME_ZONE_INFORMATION | 172 | +80 | +64 | ログ記録時のタイムゾーン情報(TIME_ZONE_INFORMATION)を示す。 |
| BootTime | LONGLONG | 8 | +256 | +240 | システム起動時刻を示す。 |
| PerfFreq | LONGLONG | 8 | +264 | +248 | 高分解能パフォーマンスカウンタの周波数を示す。 |
| StartTime | LONGLONG | 8 | +272 | +256 | トレースの開始時刻を示す。 |
| ReservedFlags | DWORD | 4 | +280 | +264 | クロックタイプ等の予約フラグを示す。 |
| BuffersLost | DWORD | 4 | +284 | +268 | 失われたバッファの数を示す。 |
共用体: _Anonymous1_e__Union x64 8B / x86 4B
| フィールド | 型 | サイズ | x64 | x86 |
|---|---|---|---|---|
| Version | DWORD | 4 | +0 | +0 |
| VersionDetail | _VersionDetail_e__Struct | 8/4 | +0 | +0 |
共用体: _Anonymous2_e__Union x64 16B / x86 16B
| フィールド | 型 | サイズ | x64 | x86 |
|---|---|---|---|---|
| LogInstanceGuid | GUID | 16 | +0 | +0 |
| Anonymous | _Anonymous_e__Struct | 8/4 | +0 | +0 |
各言語での定義
#include <windows.h>
// SYSTEMTIME (x64 16 / x86 16 バイト)
typedef struct SYSTEMTIME {
WORD wYear;
WORD wMonth;
WORD wDayOfWeek;
WORD wDay;
WORD wHour;
WORD wMinute;
WORD wSecond;
WORD wMilliseconds;
} SYSTEMTIME;
// TIME_ZONE_INFORMATION (x64 172 / x86 172 バイト)
typedef struct TIME_ZONE_INFORMATION {
INT Bias;
WCHAR StandardName[32];
SYSTEMTIME StandardDate;
INT StandardBias;
WCHAR DaylightName[32];
SYSTEMTIME DaylightDate;
INT DaylightBias;
} TIME_ZONE_INFORMATION;
// TRACE_LOGFILE_HEADER (x64 288 / x86 272 バイト)
typedef struct TRACE_LOGFILE_HEADER {
DWORD BufferSize;
_Anonymous1_e__Union Anonymous1;
DWORD ProviderVersion;
DWORD NumberOfProcessors;
LONGLONG EndTime;
DWORD TimerResolution;
DWORD MaximumFileSize;
DWORD LogFileMode;
DWORD BuffersWritten;
_Anonymous2_e__Union Anonymous2;
LPWSTR LoggerName;
LPWSTR LogFileName;
TIME_ZONE_INFORMATION TimeZone;
LONGLONG BootTime;
LONGLONG PerfFreq;
LONGLONG StartTime;
DWORD ReservedFlags;
DWORD BuffersLost;
} TRACE_LOGFILE_HEADER;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct SYSTEMTIME
{
public ushort wYear;
public ushort wMonth;
public ushort wDayOfWeek;
public ushort wDay;
public ushort wHour;
public ushort wMinute;
public ushort wSecond;
public ushort wMilliseconds;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct TIME_ZONE_INFORMATION
{
public int Bias;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)] public string StandardName;
public SYSTEMTIME StandardDate;
public int StandardBias;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)] public string DaylightName;
public SYSTEMTIME DaylightDate;
public int DaylightBias;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct TRACE_LOGFILE_HEADER
{
public uint BufferSize;
public _Anonymous1_e__Union Anonymous1;
public uint ProviderVersion;
public uint NumberOfProcessors;
public long EndTime;
public uint TimerResolution;
public uint MaximumFileSize;
public uint LogFileMode;
public uint BuffersWritten;
public _Anonymous2_e__Union Anonymous2;
public IntPtr LoggerName;
public IntPtr LogFileName;
public TIME_ZONE_INFORMATION TimeZone;
public long BootTime;
public long PerfFreq;
public long StartTime;
public uint ReservedFlags;
public uint BuffersLost;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure SYSTEMTIME
Public wYear As UShort
Public wMonth As UShort
Public wDayOfWeek As UShort
Public wDay As UShort
Public wHour As UShort
Public wMinute As UShort
Public wSecond As UShort
Public wMilliseconds As UShort
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure TIME_ZONE_INFORMATION
Public Bias As Integer
<MarshalAs(UnmanagedType.ByValTStr, SizeConst:=32)> Public StandardName As String
Public StandardDate As SYSTEMTIME
Public StandardBias As Integer
<MarshalAs(UnmanagedType.ByValTStr, SizeConst:=32)> Public DaylightName As String
Public DaylightDate As SYSTEMTIME
Public DaylightBias As Integer
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure TRACE_LOGFILE_HEADER
Public BufferSize As UInteger
Public Anonymous1 As _Anonymous1_e__Union
Public ProviderVersion As UInteger
Public NumberOfProcessors As UInteger
Public EndTime As Long
Public TimerResolution As UInteger
Public MaximumFileSize As UInteger
Public LogFileMode As UInteger
Public BuffersWritten As UInteger
Public Anonymous2 As _Anonymous2_e__Union
Public LoggerName As IntPtr
Public LogFileName As IntPtr
Public TimeZone As TIME_ZONE_INFORMATION
Public BootTime As Long
Public PerfFreq As Long
Public StartTime As Long
Public ReservedFlags As UInteger
Public BuffersLost As UInteger
End Structureimport ctypes
from ctypes import wintypes
class SYSTEMTIME(ctypes.Structure):
_fields_ = [
("wYear", ctypes.c_ushort),
("wMonth", ctypes.c_ushort),
("wDayOfWeek", ctypes.c_ushort),
("wDay", ctypes.c_ushort),
("wHour", ctypes.c_ushort),
("wMinute", ctypes.c_ushort),
("wSecond", ctypes.c_ushort),
("wMilliseconds", ctypes.c_ushort),
]
class TIME_ZONE_INFORMATION(ctypes.Structure):
_fields_ = [
("Bias", ctypes.c_int),
("StandardName", ctypes.c_wchar * 32),
("StandardDate", SYSTEMTIME),
("StandardBias", ctypes.c_int),
("DaylightName", ctypes.c_wchar * 32),
("DaylightDate", SYSTEMTIME),
("DaylightBias", ctypes.c_int),
]
class TRACE_LOGFILE_HEADER(ctypes.Structure):
_fields_ = [
("BufferSize", wintypes.DWORD),
("Anonymous1", _Anonymous1_e__Union),
("ProviderVersion", wintypes.DWORD),
("NumberOfProcessors", wintypes.DWORD),
("EndTime", ctypes.c_longlong),
("TimerResolution", wintypes.DWORD),
("MaximumFileSize", wintypes.DWORD),
("LogFileMode", wintypes.DWORD),
("BuffersWritten", wintypes.DWORD),
("Anonymous2", _Anonymous2_e__Union),
("LoggerName", ctypes.c_void_p),
("LogFileName", ctypes.c_void_p),
("TimeZone", TIME_ZONE_INFORMATION),
("BootTime", ctypes.c_longlong),
("PerfFreq", ctypes.c_longlong),
("StartTime", ctypes.c_longlong),
("ReservedFlags", wintypes.DWORD),
("BuffersLost", wintypes.DWORD),
]#[repr(C)]
pub struct SYSTEMTIME {
pub wYear: u16,
pub wMonth: u16,
pub wDayOfWeek: u16,
pub wDay: u16,
pub wHour: u16,
pub wMinute: u16,
pub wSecond: u16,
pub wMilliseconds: u16,
}
#[repr(C)]
pub struct TIME_ZONE_INFORMATION {
pub Bias: i32,
pub StandardName: [u16; 32],
pub StandardDate: SYSTEMTIME,
pub StandardBias: i32,
pub DaylightName: [u16; 32],
pub DaylightDate: SYSTEMTIME,
pub DaylightBias: i32,
}
#[repr(C)]
pub struct TRACE_LOGFILE_HEADER {
pub BufferSize: u32,
pub Anonymous1: _Anonymous1_e__Union,
pub ProviderVersion: u32,
pub NumberOfProcessors: u32,
pub EndTime: i64,
pub TimerResolution: u32,
pub MaximumFileSize: u32,
pub LogFileMode: u32,
pub BuffersWritten: u32,
pub Anonymous2: _Anonymous2_e__Union,
pub LoggerName: *mut core::ffi::c_void,
pub LogFileName: *mut core::ffi::c_void,
pub TimeZone: TIME_ZONE_INFORMATION,
pub BootTime: i64,
pub PerfFreq: i64,
pub StartTime: i64,
pub ReservedFlags: u32,
pub BuffersLost: u32,
}import "golang.org/x/sys/windows"
type SYSTEMTIME struct {
wYear uint16
wMonth uint16
wDayOfWeek uint16
wDay uint16
wHour uint16
wMinute uint16
wSecond uint16
wMilliseconds uint16
}
type TIME_ZONE_INFORMATION struct {
Bias int32
StandardName [32]uint16
StandardDate SYSTEMTIME
StandardBias int32
DaylightName [32]uint16
DaylightDate SYSTEMTIME
DaylightBias int32
}
type TRACE_LOGFILE_HEADER struct {
BufferSize uint32
Anonymous1 _Anonymous1_e__Union
ProviderVersion uint32
NumberOfProcessors uint32
EndTime int64
TimerResolution uint32
MaximumFileSize uint32
LogFileMode uint32
BuffersWritten uint32
Anonymous2 _Anonymous2_e__Union
LoggerName uintptr
LogFileName uintptr
TimeZone TIME_ZONE_INFORMATION
BootTime int64
PerfFreq int64
StartTime int64
ReservedFlags uint32
BuffersLost uint32
}type
SYSTEMTIME = record
wYear: Word;
wMonth: Word;
wDayOfWeek: Word;
wDay: Word;
wHour: Word;
wMinute: Word;
wSecond: Word;
wMilliseconds: Word;
end;
TIME_ZONE_INFORMATION = record
Bias: Integer;
StandardName: array[0..31] of WideChar;
StandardDate: SYSTEMTIME;
StandardBias: Integer;
DaylightName: array[0..31] of WideChar;
DaylightDate: SYSTEMTIME;
DaylightBias: Integer;
end;
TRACE_LOGFILE_HEADER = record
BufferSize: DWORD;
Anonymous1: _Anonymous1_e__Union;
ProviderVersion: DWORD;
NumberOfProcessors: DWORD;
EndTime: Int64;
TimerResolution: DWORD;
MaximumFileSize: DWORD;
LogFileMode: DWORD;
BuffersWritten: DWORD;
Anonymous2: _Anonymous2_e__Union;
LoggerName: Pointer;
LogFileName: Pointer;
TimeZone: TIME_ZONE_INFORMATION;
BootTime: Int64;
PerfFreq: Int64;
StartTime: Int64;
ReservedFlags: DWORD;
BuffersLost: DWORD;
end;const SYSTEMTIME = extern struct {
wYear: u16,
wMonth: u16,
wDayOfWeek: u16,
wDay: u16,
wHour: u16,
wMinute: u16,
wSecond: u16,
wMilliseconds: u16,
};
const TIME_ZONE_INFORMATION = extern struct {
Bias: i32,
StandardName: [32]u16,
StandardDate: SYSTEMTIME,
StandardBias: i32,
DaylightName: [32]u16,
DaylightDate: SYSTEMTIME,
DaylightBias: i32,
};
const TRACE_LOGFILE_HEADER = extern struct {
BufferSize: u32,
Anonymous1: _Anonymous1_e__Union,
ProviderVersion: u32,
NumberOfProcessors: u32,
EndTime: i64,
TimerResolution: u32,
MaximumFileSize: u32,
LogFileMode: u32,
BuffersWritten: u32,
Anonymous2: _Anonymous2_e__Union,
LoggerName: ?*anyopaque,
LogFileName: ?*anyopaque,
TimeZone: TIME_ZONE_INFORMATION,
BootTime: i64,
PerfFreq: i64,
StartTime: i64,
ReservedFlags: u32,
BuffersLost: u32,
};type
SYSTEMTIME {.bycopy.} = object
wYear: uint16
wMonth: uint16
wDayOfWeek: uint16
wDay: uint16
wHour: uint16
wMinute: uint16
wSecond: uint16
wMilliseconds: uint16
TIME_ZONE_INFORMATION {.bycopy.} = object
Bias: int32
StandardName: array[32, uint16]
StandardDate: SYSTEMTIME
StandardBias: int32
DaylightName: array[32, uint16]
DaylightDate: SYSTEMTIME
DaylightBias: int32
TRACE_LOGFILE_HEADER {.bycopy.} = object
BufferSize: uint32
Anonymous1: _Anonymous1_e__Union
ProviderVersion: uint32
NumberOfProcessors: uint32
EndTime: int64
TimerResolution: uint32
MaximumFileSize: uint32
LogFileMode: uint32
BuffersWritten: uint32
Anonymous2: _Anonymous2_e__Union
LoggerName: pointer
LogFileName: pointer
TimeZone: TIME_ZONE_INFORMATION
BootTime: int64
PerfFreq: int64
StartTime: int64
ReservedFlags: uint32
BuffersLost: uint32struct SYSTEMTIME
{
ushort wYear;
ushort wMonth;
ushort wDayOfWeek;
ushort wDay;
ushort wHour;
ushort wMinute;
ushort wSecond;
ushort wMilliseconds;
}
struct TIME_ZONE_INFORMATION
{
int Bias;
wchar[32] StandardName;
SYSTEMTIME StandardDate;
int StandardBias;
wchar[32] DaylightName;
SYSTEMTIME DaylightDate;
int DaylightBias;
}
struct TRACE_LOGFILE_HEADER
{
uint BufferSize;
_Anonymous1_e__Union Anonymous1;
uint ProviderVersion;
uint NumberOfProcessors;
long EndTime;
uint TimerResolution;
uint MaximumFileSize;
uint LogFileMode;
uint BuffersWritten;
_Anonymous2_e__Union Anonymous2;
void* LoggerName;
void* LogFileName;
TIME_ZONE_INFORMATION TimeZone;
long BootTime;
long PerfFreq;
long StartTime;
uint ReservedFlags;
uint BuffersLost;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; TRACE_LOGFILE_HEADER サイズ: 272 バイト(x86)
dim st, 68 ; 4byte整数×68(構造体サイズ 272 / 4 切り上げ)
; BufferSize : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; Anonymous1 : _Anonymous1_e__Union (+4, 4byte) varptr(st)+4 を基点に操作(4byte:入れ子/配列)
; ProviderVersion : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; NumberOfProcessors : DWORD (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; EndTime : LONGLONG (+16, 8byte) qpoke st,16,値 / qpeek(st,16) ※IronHSPのみ。3.7/3.8は lpoke st,16,下位 : lpoke st,20,上位
; TimerResolution : DWORD (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; MaximumFileSize : DWORD (+28, 4byte) st.7 = 値 / 値 = st.7 (lpoke/lpeek も可)
; LogFileMode : DWORD (+32, 4byte) st.8 = 値 / 値 = st.8 (lpoke/lpeek も可)
; BuffersWritten : DWORD (+36, 4byte) st.9 = 値 / 値 = st.9 (lpoke/lpeek も可)
; Anonymous2 : _Anonymous2_e__Union (+40, 16byte) varptr(st)+40 を基点に操作(16byte:入れ子/配列)
; LoggerName : LPWSTR (+56, 4byte) st.14 = 値 / 値 = st.14 (lpoke/lpeek も可)
; LogFileName : LPWSTR (+60, 4byte) st.15 = 値 / 値 = st.15 (lpoke/lpeek も可)
; TimeZone : TIME_ZONE_INFORMATION (+64, 172byte) varptr(st)+64 を基点に操作(172byte:入れ子/配列)
; BootTime : LONGLONG (+240, 8byte) qpoke st,240,値 / qpeek(st,240) ※IronHSPのみ。3.7/3.8は lpoke st,240,下位 : lpoke st,244,上位
; PerfFreq : LONGLONG (+248, 8byte) qpoke st,248,値 / qpeek(st,248) ※IronHSPのみ。3.7/3.8は lpoke st,248,下位 : lpoke st,252,上位
; StartTime : LONGLONG (+256, 8byte) qpoke st,256,値 / qpeek(st,256) ※IronHSPのみ。3.7/3.8は lpoke st,256,下位 : lpoke st,260,上位
; ReservedFlags : DWORD (+264, 4byte) st.66 = 値 / 値 = st.66 (lpoke/lpeek も可)
; BuffersLost : DWORD (+268, 4byte) st.67 = 値 / 値 = st.67 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; TRACE_LOGFILE_HEADER サイズ: 288 バイト(x64)
dim st, 72 ; 4byte整数×72(構造体サイズ 288 / 4 切り上げ)
; BufferSize : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; Anonymous1 : _Anonymous1_e__Union (+8, 8byte) varptr(st)+8 を基点に操作(8byte:入れ子/配列)
; ProviderVersion : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; NumberOfProcessors : DWORD (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; EndTime : LONGLONG (+24, 8byte) qpoke st,24,値 / qpeek(st,24) ※IronHSPのみ。3.7/3.8は lpoke st,24,下位 : lpoke st,28,上位
; TimerResolution : DWORD (+32, 4byte) st.8 = 値 / 値 = st.8 (lpoke/lpeek も可)
; MaximumFileSize : DWORD (+36, 4byte) st.9 = 値 / 値 = st.9 (lpoke/lpeek も可)
; LogFileMode : DWORD (+40, 4byte) st.10 = 値 / 値 = st.10 (lpoke/lpeek も可)
; BuffersWritten : DWORD (+44, 4byte) st.11 = 値 / 値 = st.11 (lpoke/lpeek も可)
; Anonymous2 : _Anonymous2_e__Union (+48, 16byte) varptr(st)+48 を基点に操作(16byte:入れ子/配列)
; LoggerName : LPWSTR (+64, 8byte) qpoke st,64,値 / qpeek(st,64) ※IronHSPのみ。3.7/3.8は lpoke st,64,下位 : lpoke st,68,上位
; LogFileName : LPWSTR (+72, 8byte) qpoke st,72,値 / qpeek(st,72) ※IronHSPのみ。3.7/3.8は lpoke st,72,下位 : lpoke st,76,上位
; TimeZone : TIME_ZONE_INFORMATION (+80, 172byte) varptr(st)+80 を基点に操作(172byte:入れ子/配列)
; BootTime : LONGLONG (+256, 8byte) qpoke st,256,値 / qpeek(st,256) ※IronHSPのみ。3.7/3.8は lpoke st,256,下位 : lpoke st,260,上位
; PerfFreq : LONGLONG (+264, 8byte) qpoke st,264,値 / qpeek(st,264) ※IronHSPのみ。3.7/3.8は lpoke st,264,下位 : lpoke st,268,上位
; StartTime : LONGLONG (+272, 8byte) qpoke st,272,値 / qpeek(st,272) ※IronHSPのみ。3.7/3.8は lpoke st,272,下位 : lpoke st,276,上位
; ReservedFlags : DWORD (+280, 4byte) st.70 = 値 / 値 = st.70 (lpoke/lpeek も可)
; BuffersLost : DWORD (+284, 4byte) st.71 = 値 / 値 = st.71 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
; ※GUID・入れ子構造体はデフォルト型でないため、依存する #defstruct を先に定義(下記に同梱)。
#defstruct global SYSTEMTIME
#field short wYear
#field short wMonth
#field short wDayOfWeek
#field short wDay
#field short wHour
#field short wMinute
#field short wSecond
#field short wMilliseconds
#endstruct
#defstruct global TIME_ZONE_INFORMATION
#field int Bias
#field wchar StandardName 32
#field SYSTEMTIME StandardDate
#field int StandardBias
#field wchar DaylightName 32
#field SYSTEMTIME DaylightDate
#field int DaylightBias
#endstruct
#defstruct global TRACE_LOGFILE_HEADER
#field int BufferSize
#field byte Anonymous1 8
#field int ProviderVersion
#field int NumberOfProcessors
#field int64 EndTime
#field int TimerResolution
#field int MaximumFileSize
#field int LogFileMode
#field int BuffersWritten
#field byte Anonymous2 16
#field intptr LoggerName
#field intptr LogFileName
#field TIME_ZONE_INFORMATION TimeZone
#field int64 BootTime
#field int64 PerfFreq
#field int64 StartTime
#field int ReservedFlags
#field int BuffersLost
#endstruct
stdim st, TRACE_LOGFILE_HEADER ; NSTRUCT 変数を確保
st->BufferSize = 100
mes "BufferSize=" + st->BufferSize
; ※union フィールドは byte 列で確保(NSTRUCT は union 非対応)。必要に応じ手動でアクセス。