ホーム › System.Diagnostics.Debug › MINIDUMP_FUNCTION_TABLE_STREAM
MINIDUMP_FUNCTION_TABLE_STREAM
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| SizeOfHeader | DWORD | 4 | +0 | +0 | このヘッダのバイトサイズ。 |
| SizeOfDescriptor | DWORD | 4 | +4 | +4 | 各記述子のバイトサイズ。 |
| SizeOfNativeDescriptor | DWORD | 4 | +8 | +8 | ネイティブ記述子のバイトサイズ。 |
| SizeOfFunctionEntry | DWORD | 4 | +12 | +12 | 各関数エントリのバイトサイズ。 |
| NumberOfDescriptors | DWORD | 4 | +16 | +16 | 記述子の個数。 |
| SizeOfAlignPad | DWORD | 4 | +20 | +20 | アラインメント調整用パディングのサイズ。 |
各言語での定義
#include <windows.h>
// MINIDUMP_FUNCTION_TABLE_STREAM (x64 24 / x86 24 バイト)
#pragma pack(push, 4)
typedef struct MINIDUMP_FUNCTION_TABLE_STREAM {
DWORD SizeOfHeader;
DWORD SizeOfDescriptor;
DWORD SizeOfNativeDescriptor;
DWORD SizeOfFunctionEntry;
DWORD NumberOfDescriptors;
DWORD SizeOfAlignPad;
} MINIDUMP_FUNCTION_TABLE_STREAM;
#pragma pack(pop)using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, Pack = 4, CharSet = CharSet.Unicode)]
public struct MINIDUMP_FUNCTION_TABLE_STREAM
{
public uint SizeOfHeader;
public uint SizeOfDescriptor;
public uint SizeOfNativeDescriptor;
public uint SizeOfFunctionEntry;
public uint NumberOfDescriptors;
public uint SizeOfAlignPad;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, Pack:=4, CharSet:=CharSet.Unicode)>
Public Structure MINIDUMP_FUNCTION_TABLE_STREAM
Public SizeOfHeader As UInteger
Public SizeOfDescriptor As UInteger
Public SizeOfNativeDescriptor As UInteger
Public SizeOfFunctionEntry As UInteger
Public NumberOfDescriptors As UInteger
Public SizeOfAlignPad As UInteger
End Structureimport ctypes
from ctypes import wintypes
class MINIDUMP_FUNCTION_TABLE_STREAM(ctypes.Structure):
_pack_ = 4
_fields_ = [
("SizeOfHeader", wintypes.DWORD),
("SizeOfDescriptor", wintypes.DWORD),
("SizeOfNativeDescriptor", wintypes.DWORD),
("SizeOfFunctionEntry", wintypes.DWORD),
("NumberOfDescriptors", wintypes.DWORD),
("SizeOfAlignPad", wintypes.DWORD),
]#[repr(C, packed(4))]
pub struct MINIDUMP_FUNCTION_TABLE_STREAM {
pub SizeOfHeader: u32,
pub SizeOfDescriptor: u32,
pub SizeOfNativeDescriptor: u32,
pub SizeOfFunctionEntry: u32,
pub NumberOfDescriptors: u32,
pub SizeOfAlignPad: u32,
}import "golang.org/x/sys/windows"
type MINIDUMP_FUNCTION_TABLE_STREAM struct {
SizeOfHeader uint32
SizeOfDescriptor uint32
SizeOfNativeDescriptor uint32
SizeOfFunctionEntry uint32
NumberOfDescriptors uint32
SizeOfAlignPad uint32
}type
MINIDUMP_FUNCTION_TABLE_STREAM = packed record
SizeOfHeader: DWORD;
SizeOfDescriptor: DWORD;
SizeOfNativeDescriptor: DWORD;
SizeOfFunctionEntry: DWORD;
NumberOfDescriptors: DWORD;
SizeOfAlignPad: DWORD;
end;const MINIDUMP_FUNCTION_TABLE_STREAM = extern struct {
SizeOfHeader: u32,
SizeOfDescriptor: u32,
SizeOfNativeDescriptor: u32,
SizeOfFunctionEntry: u32,
NumberOfDescriptors: u32,
SizeOfAlignPad: u32,
};type
MINIDUMP_FUNCTION_TABLE_STREAM {.packed.} = object
SizeOfHeader: uint32
SizeOfDescriptor: uint32
SizeOfNativeDescriptor: uint32
SizeOfFunctionEntry: uint32
NumberOfDescriptors: uint32
SizeOfAlignPad: uint32align(4)
struct MINIDUMP_FUNCTION_TABLE_STREAM
{
uint SizeOfHeader;
uint SizeOfDescriptor;
uint SizeOfNativeDescriptor;
uint SizeOfFunctionEntry;
uint NumberOfDescriptors;
uint SizeOfAlignPad;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; MINIDUMP_FUNCTION_TABLE_STREAM サイズ: 24 バイト(x64)
dim st, 6 ; 4byte整数×6(構造体サイズ 24 / 4 切り上げ)
; SizeOfHeader : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; SizeOfDescriptor : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; SizeOfNativeDescriptor : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; SizeOfFunctionEntry : DWORD (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; NumberOfDescriptors : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; SizeOfAlignPad : DWORD (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global MINIDUMP_FUNCTION_TABLE_STREAM, pack=4
#field int SizeOfHeader
#field int SizeOfDescriptor
#field int SizeOfNativeDescriptor
#field int SizeOfFunctionEntry
#field int NumberOfDescriptors
#field int SizeOfAlignPad
#endstruct
stdim st, MINIDUMP_FUNCTION_TABLE_STREAM ; NSTRUCT 変数を確保
st->SizeOfHeader = 100
mes "SizeOfHeader=" + st->SizeOfHeader