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

SYMSRV_INDEX_INFOW

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

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

フィールド

フィールドサイズx64x86説明
sizeofstructDWORD4+0+0この構造体のバイトサイズを示す。
fileWCHAR522+4+4ファイル名を示すワイド文字配列。
strippedBOOL4+528+528デバッグ情報が分離(strip)済みかを示すフラグ。
timestampDWORD4+532+532ファイルのタイムスタンプを示す。
sizeDWORD4+536+536ファイルのバイトサイズを示す。
dbgfileWCHAR522+540+540対応する DBG ファイル名を示すワイド文字配列。
pdbfileWCHAR522+1062+1062対応する PDB ファイル名を示すワイド文字配列。
guidGUID16+1584+1584PDB を一意に識別する GUID を示す。
sigDWORD4+1600+1600シンボル署名(旧形式)を示す。
ageDWORD4+1604+1604PDB のエイジ(改訂番号)を示す。

各言語での定義

#include <windows.h>

// SYMSRV_INDEX_INFOW  (x64 1608 / x86 1608 バイト)
typedef struct SYMSRV_INDEX_INFOW {
    DWORD sizeofstruct;
    WCHAR file[261];
    BOOL stripped;
    DWORD timestamp;
    DWORD size;
    WCHAR dbgfile[261];
    WCHAR pdbfile[261];
    GUID guid;
    DWORD sig;
    DWORD age;
} SYMSRV_INDEX_INFOW;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct SYMSRV_INDEX_INFOW
{
    public uint sizeofstruct;
    [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 261)] public string file;
    [MarshalAs(UnmanagedType.Bool)] public bool stripped;
    public uint timestamp;
    public uint size;
    [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 261)] public string dbgfile;
    [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 261)] public string pdbfile;
    public Guid guid;
    public uint sig;
    public uint age;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure SYMSRV_INDEX_INFOW
    Public sizeofstruct As UInteger
    <MarshalAs(UnmanagedType.ByValTStr, SizeConst:=261)> Public file As String
    <MarshalAs(UnmanagedType.Bool)> Public stripped As Boolean
    Public timestamp As UInteger
    Public size As UInteger
    <MarshalAs(UnmanagedType.ByValTStr, SizeConst:=261)> Public dbgfile As String
    <MarshalAs(UnmanagedType.ByValTStr, SizeConst:=261)> Public pdbfile As String
    Public guid As Guid
    Public sig As UInteger
    Public age As UInteger
End Structure
import ctypes
from ctypes import wintypes

class SYMSRV_INDEX_INFOW(ctypes.Structure):
    _fields_ = [
        ("sizeofstruct", wintypes.DWORD),
        ("file", ctypes.c_wchar * 261),
        ("stripped", wintypes.BOOL),
        ("timestamp", wintypes.DWORD),
        ("size", wintypes.DWORD),
        ("dbgfile", ctypes.c_wchar * 261),
        ("pdbfile", ctypes.c_wchar * 261),
        ("guid", GUID),
        ("sig", wintypes.DWORD),
        ("age", wintypes.DWORD),
    ]
#[repr(C)]
pub struct SYMSRV_INDEX_INFOW {
    pub sizeofstruct: u32,
    pub file: [u16; 261],
    pub stripped: i32,
    pub timestamp: u32,
    pub size: u32,
    pub dbgfile: [u16; 261],
    pub pdbfile: [u16; 261],
    pub guid: GUID,
    pub sig: u32,
    pub age: u32,
}
import "golang.org/x/sys/windows"

type SYMSRV_INDEX_INFOW struct {
	sizeofstruct uint32
	file [261]uint16
	stripped int32
	timestamp uint32
	size uint32
	dbgfile [261]uint16
	pdbfile [261]uint16
	guid windows.GUID
	sig uint32
	age uint32
}
type
  SYMSRV_INDEX_INFOW = record
    sizeofstruct: DWORD;
    file: array[0..260] of WideChar;
    stripped: BOOL;
    timestamp: DWORD;
    size: DWORD;
    dbgfile: array[0..260] of WideChar;
    pdbfile: array[0..260] of WideChar;
    guid: TGUID;
    sig: DWORD;
    age: DWORD;
  end;
const SYMSRV_INDEX_INFOW = extern struct {
    sizeofstruct: u32,
    file: [261]u16,
    stripped: i32,
    timestamp: u32,
    size: u32,
    dbgfile: [261]u16,
    pdbfile: [261]u16,
    guid: GUID,
    sig: u32,
    age: u32,
};
type
  SYMSRV_INDEX_INFOW {.bycopy.} = object
    sizeofstruct: uint32
    file: array[261, uint16]
    stripped: int32
    timestamp: uint32
    size: uint32
    dbgfile: array[261, uint16]
    pdbfile: array[261, uint16]
    guid: GUID
    sig: uint32
    age: uint32
struct SYMSRV_INDEX_INFOW
{
    uint sizeofstruct;
    wchar[261] file;
    int stripped;
    uint timestamp;
    uint size;
    wchar[261] dbgfile;
    wchar[261] pdbfile;
    GUID guid;
    uint sig;
    uint age;
}

HSP用 定義

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

; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; SYMSRV_INDEX_INFOW サイズ: 1608 バイト(x64)
dim st, 402    ; 4byte整数×402(構造体サイズ 1608 / 4 切り上げ)
; sizeofstruct : DWORD (+0, 4byte)  st.0 = 値  /  値 = st.0   (lpoke/lpeek も可)
; file : WCHAR (+4, 522byte)  varptr(st)+4 を基点に操作(522byte:入れ子/配列)
; stripped : BOOL (+528, 4byte)  st.132 = 値  /  値 = st.132   (lpoke/lpeek も可)
; timestamp : DWORD (+532, 4byte)  st.133 = 値  /  値 = st.133   (lpoke/lpeek も可)
; size : DWORD (+536, 4byte)  st.134 = 値  /  値 = st.134   (lpoke/lpeek も可)
; dbgfile : WCHAR (+540, 522byte)  varptr(st)+540 を基点に操作(522byte:入れ子/配列)
; pdbfile : WCHAR (+1062, 522byte)  varptr(st)+1062 を基点に操作(522byte:入れ子/配列)
; guid : GUID (+1584, 16byte)  varptr(st)+1584 を基点に操作(16byte:入れ子/配列)
; sig : DWORD (+1600, 4byte)  st.400 = 値  /  値 = st.400   (lpoke/lpeek も可)
; age : DWORD (+1604, 4byte)  st.401 = 値  /  値 = st.401   (lpoke/lpeek も可)
; ※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 SYMSRV_INDEX_INFOW
    #field int sizeofstruct
    #field wchar file 261
    #field bool stripped
    #field int timestamp
    #field int size
    #field wchar dbgfile 261
    #field wchar pdbfile 261
    #field GUID guid
    #field int sig
    #field int age
#endstruct

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