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

SYMSRV_INDEX_INFO

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

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

フィールド

フィールドサイズx64x86説明
sizeofstructDWORD4+0+0この構造体のバイトサイズを示す。
fileCHAR261+4+4ファイル名を示す ANSI 文字配列。
strippedBOOL4+268+268デバッグ情報が分離(strip)済みかを示すフラグ。
timestampDWORD4+272+272ファイルのタイムスタンプを示す。
sizeDWORD4+276+276ファイルのバイトサイズを示す。
dbgfileCHAR261+280+280対応する DBG ファイル名を示す ANSI 文字配列。
pdbfileCHAR261+541+541対応する PDB ファイル名を示す ANSI 文字配列。
guidGUID16+804+804PDB を一意に識別する GUID を示す。
sigDWORD4+820+820シンボル署名(旧形式)を示す。
ageDWORD4+824+824PDB のエイジ(改訂番号)を示す。

各言語での定義

#include <windows.h>

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

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

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

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

type SYMSRV_INDEX_INFO struct {
	sizeofstruct uint32
	file [261]int8
	stripped int32
	timestamp uint32
	size uint32
	dbgfile [261]int8
	pdbfile [261]int8
	guid windows.GUID
	sig uint32
	age uint32
}
type
  SYMSRV_INDEX_INFO = record
    sizeofstruct: DWORD;
    file: array[0..260] of Shortint;
    stripped: BOOL;
    timestamp: DWORD;
    size: DWORD;
    dbgfile: array[0..260] of Shortint;
    pdbfile: array[0..260] of Shortint;
    guid: TGUID;
    sig: DWORD;
    age: DWORD;
  end;
const SYMSRV_INDEX_INFO = extern struct {
    sizeofstruct: u32,
    file: [261]i8,
    stripped: i32,
    timestamp: u32,
    size: u32,
    dbgfile: [261]i8,
    pdbfile: [261]i8,
    guid: GUID,
    sig: u32,
    age: u32,
};
type
  SYMSRV_INDEX_INFO {.bycopy.} = object
    sizeofstruct: uint32
    file: array[261, int8]
    stripped: int32
    timestamp: uint32
    size: uint32
    dbgfile: array[261, int8]
    pdbfile: array[261, int8]
    guid: GUID
    sig: uint32
    age: uint32
struct SYMSRV_INDEX_INFO
{
    uint sizeofstruct;
    byte[261] file;
    int stripped;
    uint timestamp;
    uint size;
    byte[261] dbgfile;
    byte[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_INFO サイズ: 828 バイト(x64)
dim st, 207    ; 4byte整数×207(構造体サイズ 828 / 4 切り上げ)
; sizeofstruct : DWORD (+0, 4byte)  st.0 = 値  /  値 = st.0   (lpoke/lpeek も可)
; file : CHAR (+4, 261byte)  varptr(st)+4 を基点に操作(261byte:入れ子/配列)
; stripped : BOOL (+268, 4byte)  st.67 = 値  /  値 = st.67   (lpoke/lpeek も可)
; timestamp : DWORD (+272, 4byte)  st.68 = 値  /  値 = st.68   (lpoke/lpeek も可)
; size : DWORD (+276, 4byte)  st.69 = 値  /  値 = st.69   (lpoke/lpeek も可)
; dbgfile : CHAR (+280, 261byte)  varptr(st)+280 を基点に操作(261byte:入れ子/配列)
; pdbfile : CHAR (+541, 261byte)  varptr(st)+541 を基点に操作(261byte:入れ子/配列)
; guid : GUID (+804, 16byte)  varptr(st)+804 を基点に操作(16byte:入れ子/配列)
; sig : DWORD (+820, 4byte)  st.205 = 値  /  値 = st.205   (lpoke/lpeek も可)
; age : DWORD (+824, 4byte)  st.206 = 値  /  値 = st.206   (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_INFO
    #field int sizeofstruct
    #field byte file 261
    #field bool stripped
    #field int timestamp
    #field int size
    #field byte dbgfile 261
    #field byte pdbfile 261
    #field GUID guid
    #field int sig
    #field int age
#endstruct

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