ホーム › System.Diagnostics.Debug › MINIDUMP_MEMORY64_LIST
MINIDUMP_MEMORY64_LIST
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| NumberOfMemoryRanges | ULONGLONG | 8 | +0 | +0 | メモリ範囲の数(64ビット)。 |
| BaseRva | ULONGLONG | 8 | +8 | +8 | 全メモリデータの先頭RVA。各範囲は連続して続く。 |
| MemoryRanges | MINIDUMP_MEMORY_DESCRIPTOR64 | 16 | +16 | +16 | 64ビットメモリ記述子の配列。 |
各言語での定義
#include <windows.h>
// MINIDUMP_MEMORY_DESCRIPTOR64 (x64 16 / x86 16 バイト)
#pragma pack(push, 4)
typedef struct MINIDUMP_MEMORY_DESCRIPTOR64 {
ULONGLONG StartOfMemoryRange;
ULONGLONG DataSize;
} MINIDUMP_MEMORY_DESCRIPTOR64;
#pragma pack(pop)
// MINIDUMP_MEMORY64_LIST (x64 32 / x86 32 バイト)
#pragma pack(push, 4)
typedef struct MINIDUMP_MEMORY64_LIST {
ULONGLONG NumberOfMemoryRanges;
ULONGLONG BaseRva;
MINIDUMP_MEMORY_DESCRIPTOR64 MemoryRanges[1];
} MINIDUMP_MEMORY64_LIST;
#pragma pack(pop)using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, Pack = 4, CharSet = CharSet.Unicode)]
public struct MINIDUMP_MEMORY_DESCRIPTOR64
{
public ulong StartOfMemoryRange;
public ulong DataSize;
}
[StructLayout(LayoutKind.Sequential, Pack = 4, CharSet = CharSet.Unicode)]
public struct MINIDUMP_MEMORY64_LIST
{
public ulong NumberOfMemoryRanges;
public ulong BaseRva;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 1)] public MINIDUMP_MEMORY_DESCRIPTOR64[] MemoryRanges;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, Pack:=4, CharSet:=CharSet.Unicode)>
Public Structure MINIDUMP_MEMORY_DESCRIPTOR64
Public StartOfMemoryRange As ULong
Public DataSize As ULong
End Structure
<StructLayout(LayoutKind.Sequential, Pack:=4, CharSet:=CharSet.Unicode)>
Public Structure MINIDUMP_MEMORY64_LIST
Public NumberOfMemoryRanges As ULong
Public BaseRva As ULong
<MarshalAs(UnmanagedType.ByValArray, SizeConst:=1)> Public MemoryRanges() As MINIDUMP_MEMORY_DESCRIPTOR64
End Structureimport ctypes
from ctypes import wintypes
class MINIDUMP_MEMORY_DESCRIPTOR64(ctypes.Structure):
_pack_ = 4
_fields_ = [
("StartOfMemoryRange", ctypes.c_ulonglong),
("DataSize", ctypes.c_ulonglong),
]
class MINIDUMP_MEMORY64_LIST(ctypes.Structure):
_pack_ = 4
_fields_ = [
("NumberOfMemoryRanges", ctypes.c_ulonglong),
("BaseRva", ctypes.c_ulonglong),
("MemoryRanges", MINIDUMP_MEMORY_DESCRIPTOR64 * 1),
]#[repr(C, packed(4))]
pub struct MINIDUMP_MEMORY_DESCRIPTOR64 {
pub StartOfMemoryRange: u64,
pub DataSize: u64,
}
#[repr(C, packed(4))]
pub struct MINIDUMP_MEMORY64_LIST {
pub NumberOfMemoryRanges: u64,
pub BaseRva: u64,
pub MemoryRanges: [MINIDUMP_MEMORY_DESCRIPTOR64; 1],
}import "golang.org/x/sys/windows"
type MINIDUMP_MEMORY_DESCRIPTOR64 struct {
StartOfMemoryRange uint64
DataSize uint64
}
type MINIDUMP_MEMORY64_LIST struct {
NumberOfMemoryRanges uint64
BaseRva uint64
MemoryRanges [1]MINIDUMP_MEMORY_DESCRIPTOR64
}type
MINIDUMP_MEMORY_DESCRIPTOR64 = packed record
StartOfMemoryRange: UInt64;
DataSize: UInt64;
end;
MINIDUMP_MEMORY64_LIST = packed record
NumberOfMemoryRanges: UInt64;
BaseRva: UInt64;
MemoryRanges: array[0..0] of MINIDUMP_MEMORY_DESCRIPTOR64;
end;const MINIDUMP_MEMORY_DESCRIPTOR64 = extern struct {
StartOfMemoryRange: u64,
DataSize: u64,
};
const MINIDUMP_MEMORY64_LIST = extern struct {
NumberOfMemoryRanges: u64,
BaseRva: u64,
MemoryRanges: [1]MINIDUMP_MEMORY_DESCRIPTOR64,
};type
MINIDUMP_MEMORY_DESCRIPTOR64 {.packed.} = object
StartOfMemoryRange: uint64
DataSize: uint64
MINIDUMP_MEMORY64_LIST {.packed.} = object
NumberOfMemoryRanges: uint64
BaseRva: uint64
MemoryRanges: array[1, MINIDUMP_MEMORY_DESCRIPTOR64]align(4)
struct MINIDUMP_MEMORY_DESCRIPTOR64
{
ulong StartOfMemoryRange;
ulong DataSize;
}
align(4)
struct MINIDUMP_MEMORY64_LIST
{
ulong NumberOfMemoryRanges;
ulong BaseRva;
MINIDUMP_MEMORY_DESCRIPTOR64[1] MemoryRanges;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; MINIDUMP_MEMORY64_LIST サイズ: 32 バイト(x64)
dim st, 8 ; 4byte整数×8(構造体サイズ 32 / 4 切り上げ)
; NumberOfMemoryRanges : ULONGLONG (+0, 8byte) qpoke st,0,値 / qpeek(st,0) ※IronHSPのみ。3.7/3.8は lpoke st,0,下位 : lpoke st,4,上位
; BaseRva : ULONGLONG (+8, 8byte) qpoke st,8,値 / qpeek(st,8) ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; MemoryRanges : MINIDUMP_MEMORY_DESCRIPTOR64 (+16, 16byte) varptr(st)+16 を基点に操作(16byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
; ※GUID・入れ子構造体はデフォルト型でないため、依存する #defstruct を先に定義(下記に同梱)。
#defstruct global MINIDUMP_MEMORY_DESCRIPTOR64, pack=4
#field int64 StartOfMemoryRange
#field int64 DataSize
#endstruct
#defstruct global MINIDUMP_MEMORY64_LIST, pack=4
#field int64 NumberOfMemoryRanges
#field int64 BaseRva
#field MINIDUMP_MEMORY_DESCRIPTOR64 MemoryRanges 1
#endstruct
stdim st, MINIDUMP_MEMORY64_LIST ; NSTRUCT 変数を確保
st->NumberOfMemoryRanges = 100
mes "NumberOfMemoryRanges=" + st->NumberOfMemoryRanges