Win32 API 日本語リファレンス
ホームSystem.Diagnostics.Etw › TRACE_LOGFILE_HEADER64

TRACE_LOGFILE_HEADER64

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

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

フィールド

フィールドサイズx64x86説明
BufferSizeDWORD4+0+0トレースバッファのバイトサイズを示す。
Anonymous1_Anonymous1_e__Union8/4+8+4OS バージョン情報を保持する無名共用体。
ProviderVersionDWORD4+16+8プロバイダのバージョンを示す。
NumberOfProcessorsDWORD4+20+12プロセッサ数を示す。
EndTimeLONGLONG8+24+16トレースの終了時刻を示す。
TimerResolutionDWORD4+32+24高分解能タイマーの分解能を示す。
MaximumFileSizeDWORD4+36+28ログファイルの最大サイズ(MB)を示す。
LogFileModeDWORD4+40+32ログファイルのモードを示すフラグ。
BuffersWrittenDWORD4+44+36書き込まれたバッファの数を示す。
Anonymous2_Anonymous2_e__Union16+48+40ログファイルのバージョンや GUID を保持する無名共用体。
LoggerNameULONGLONG8+64+56ロガーセッション名文字列へのオフセット(64ビット)を示す。
LogFileNameULONGLONG8+72+64ログファイル名文字列へのオフセット(64ビット)を示す。
TimeZoneTIME_ZONE_INFORMATION172+80+72ログ記録時のタイムゾーン情報を示す。
BootTimeLONGLONG8+256+248システム起動時刻を示す。
PerfFreqLONGLONG8+264+256高分解能パフォーマンスカウンタの周波数を示す。
StartTimeLONGLONG8+272+264トレースの開始時刻を示す。
ReservedFlagsDWORD4+280+272クロックタイプ等の予約フラグを示す。
BuffersLostDWORD4+284+276失われたバッファの数を示す。

共用体: _Anonymous1_e__Union x64 8B / x86 4B

フィールドサイズx64x86
VersionDWORD4+0+0
VersionDetail_VersionDetail_e__Struct8/4+0+0

共用体: _Anonymous2_e__Union x64 16B / x86 16B

フィールドサイズx64x86
LogInstanceGuidGUID16+0+0
Anonymous_Anonymous_e__Struct8/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_HEADER64  (x64 288 / x86 280 バイト)
typedef struct TRACE_LOGFILE_HEADER64 {
    DWORD BufferSize;
    _Anonymous1_e__Union Anonymous1;
    DWORD ProviderVersion;
    DWORD NumberOfProcessors;
    LONGLONG EndTime;
    DWORD TimerResolution;
    DWORD MaximumFileSize;
    DWORD LogFileMode;
    DWORD BuffersWritten;
    _Anonymous2_e__Union Anonymous2;
    ULONGLONG LoggerName;
    ULONGLONG LogFileName;
    TIME_ZONE_INFORMATION TimeZone;
    LONGLONG BootTime;
    LONGLONG PerfFreq;
    LONGLONG StartTime;
    DWORD ReservedFlags;
    DWORD BuffersLost;
} TRACE_LOGFILE_HEADER64;
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_HEADER64
{
    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 ulong LoggerName;
    public ulong 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_HEADER64
    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 ULong
    Public LogFileName As ULong
    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 Structure
import 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_HEADER64(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_ulonglong),
        ("LogFileName", ctypes.c_ulonglong),
        ("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_HEADER64 {
    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: u64,
    pub LogFileName: u64,
    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_HEADER64 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 uint64
	LogFileName uint64
	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_HEADER64 = 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: UInt64;
    LogFileName: UInt64;
    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_HEADER64 = 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: u64,
    LogFileName: u64,
    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_HEADER64 {.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: uint64
    LogFileName: uint64
    TimeZone: TIME_ZONE_INFORMATION
    BootTime: int64
    PerfFreq: int64
    StartTime: int64
    ReservedFlags: uint32
    BuffersLost: uint32
struct 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_HEADER64
{
    uint BufferSize;
    _Anonymous1_e__Union Anonymous1;
    uint ProviderVersion;
    uint NumberOfProcessors;
    long EndTime;
    uint TimerResolution;
    uint MaximumFileSize;
    uint LogFileMode;
    uint BuffersWritten;
    _Anonymous2_e__Union Anonymous2;
    ulong LoggerName;
    ulong 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_HEADER64 サイズ: 280 バイト(x86)
dim st, 70    ; 4byte整数×70(構造体サイズ 280 / 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 : ULONGLONG (+56, 8byte)  qpoke st,56,値 / qpeek(st,56)  ※IronHSPのみ。3.7/3.8は lpoke st,56,下位 : lpoke st,60,上位
; LogFileName : ULONGLONG (+64, 8byte)  qpoke st,64,値 / qpeek(st,64)  ※IronHSPのみ。3.7/3.8は lpoke st,64,下位 : lpoke st,68,上位
; TimeZone : TIME_ZONE_INFORMATION (+72, 172byte)  varptr(st)+72 を基点に操作(172byte:入れ子/配列)
; BootTime : LONGLONG (+248, 8byte)  qpoke st,248,値 / qpeek(st,248)  ※IronHSPのみ。3.7/3.8は lpoke st,248,下位 : lpoke st,252,上位
; PerfFreq : LONGLONG (+256, 8byte)  qpoke st,256,値 / qpeek(st,256)  ※IronHSPのみ。3.7/3.8は lpoke st,256,下位 : lpoke st,260,上位
; StartTime : LONGLONG (+264, 8byte)  qpoke st,264,値 / qpeek(st,264)  ※IronHSPのみ。3.7/3.8は lpoke st,264,下位 : lpoke st,268,上位
; ReservedFlags : DWORD (+272, 4byte)  st.68 = 値  /  値 = st.68   (lpoke/lpeek も可)
; BuffersLost : DWORD (+276, 4byte)  st.69 = 値  /  値 = st.69   (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; TRACE_LOGFILE_HEADER64 サイズ: 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 : ULONGLONG (+64, 8byte)  qpoke st,64,値 / qpeek(st,64)  ※IronHSPのみ。3.7/3.8は lpoke st,64,下位 : lpoke st,68,上位
; LogFileName : ULONGLONG (+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_HEADER64
    #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 int64 LoggerName
    #field int64 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_HEADER64        ; NSTRUCT 変数を確保
st->BufferSize = 100
mes "BufferSize=" + st->BufferSize
; ※union フィールドは byte 列で確保(NSTRUCT は union 非対応)。必要に応じ手動でアクセス。