ホーム › System.Diagnostics.Debug › MINIDUMP_MEMORY_INFO
MINIDUMP_MEMORY_INFO
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| BaseAddress | ULONGLONG | 8 | +0 | +0 | ページ領域のベースアドレスです。 | ||||||||
| AllocationBase | ULONGLONG | 8 | +8 | +8 | この領域内にあるページ範囲のベースアドレスです。当該ページはこのメモリ領域内に含まれます。 | ||||||||
| AllocationProtect | DWORD | 4 | +16 | +16 | 領域が最初に割り当てられたときのメモリ保護です。このメンバーには、 メモリ保護 オプションのいずれかを指定でき、必要に応じて PAGE_GUARD または PAGE_NOCACHE を組み合わせられます。 | ||||||||
| __alignment1 | DWORD | 4 | +20 | +20 | アラインメント調整用パディング。 | ||||||||
| RegionSize | ULONGLONG | 8 | +24 | +24 | ベースアドレスから始まり、すべてのページが同一の属性を持つ領域のサイズ (バイト単位) です。 | ||||||||
| State | VIRTUAL_ALLOCATION_TYPE | 4 | +32 | +32 | 領域内のページの状態です。このメンバーは次のいずれかの値になります。
| ||||||||
| Protect | DWORD | 4 | +36 | +36 | 領域内のページのアクセス保護です。このメンバーは、AllocationProtect メンバーに対して挙げられている値のいずれかです。 | ||||||||
| Type | DWORD | 4 | +40 | +40 | 領域内のページの種類です。次の種類が定義されています。
| ||||||||
| __alignment2 | DWORD | 4 | +44 | +44 | アラインメント調整用パディング。 |
公式ドキュメント
メモリの領域を記述します。
出典・ライセンス: 上記「公式ドキュメント」の内容は Microsoft の Win32 API ドキュメント(MicrosoftDocs/sdk-api)を日本語に翻訳・改変したものです。© Microsoft Corporation. CC BY 4.0 で提供。
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)
各言語での定義
#include <windows.h>
// MINIDUMP_MEMORY_INFO (x64 48 / x86 48 バイト)
#pragma pack(push, 4)
typedef struct MINIDUMP_MEMORY_INFO {
ULONGLONG BaseAddress;
ULONGLONG AllocationBase;
DWORD AllocationProtect;
DWORD __alignment1;
ULONGLONG RegionSize;
VIRTUAL_ALLOCATION_TYPE State;
DWORD Protect;
DWORD Type;
DWORD __alignment2;
} MINIDUMP_MEMORY_INFO;
#pragma pack(pop)using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, Pack = 4, CharSet = CharSet.Unicode)]
public struct MINIDUMP_MEMORY_INFO
{
public ulong BaseAddress;
public ulong AllocationBase;
public uint AllocationProtect;
public uint __alignment1;
public ulong RegionSize;
public uint State;
public uint Protect;
public uint Type;
public uint __alignment2;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, Pack:=4, CharSet:=CharSet.Unicode)>
Public Structure MINIDUMP_MEMORY_INFO
Public BaseAddress As ULong
Public AllocationBase As ULong
Public AllocationProtect As UInteger
Public __alignment1 As UInteger
Public RegionSize As ULong
Public State As UInteger
Public Protect As UInteger
Public Type As UInteger
Public __alignment2 As UInteger
End Structureimport ctypes
from ctypes import wintypes
class MINIDUMP_MEMORY_INFO(ctypes.Structure):
_pack_ = 4
_fields_ = [
("BaseAddress", ctypes.c_ulonglong),
("AllocationBase", ctypes.c_ulonglong),
("AllocationProtect", wintypes.DWORD),
("__alignment1", wintypes.DWORD),
("RegionSize", ctypes.c_ulonglong),
("State", wintypes.DWORD),
("Protect", wintypes.DWORD),
("Type", wintypes.DWORD),
("__alignment2", wintypes.DWORD),
]#[repr(C, packed(4))]
pub struct MINIDUMP_MEMORY_INFO {
pub BaseAddress: u64,
pub AllocationBase: u64,
pub AllocationProtect: u32,
pub __alignment1: u32,
pub RegionSize: u64,
pub State: u32,
pub Protect: u32,
pub Type: u32,
pub __alignment2: u32,
}import "golang.org/x/sys/windows"
type MINIDUMP_MEMORY_INFO struct {
BaseAddress uint64
AllocationBase uint64
AllocationProtect uint32
__alignment1 uint32
RegionSize uint64
State uint32
Protect uint32
Type uint32
__alignment2 uint32
}type
MINIDUMP_MEMORY_INFO = packed record
BaseAddress: UInt64;
AllocationBase: UInt64;
AllocationProtect: DWORD;
__alignment1: DWORD;
RegionSize: UInt64;
State: DWORD;
Protect: DWORD;
Type: DWORD;
__alignment2: DWORD;
end;const MINIDUMP_MEMORY_INFO = extern struct {
BaseAddress: u64,
AllocationBase: u64,
AllocationProtect: u32,
__alignment1: u32,
RegionSize: u64,
State: u32,
Protect: u32,
Type: u32,
__alignment2: u32,
};type
MINIDUMP_MEMORY_INFO {.packed.} = object
BaseAddress: uint64
AllocationBase: uint64
AllocationProtect: uint32
__alignment1: uint32
RegionSize: uint64
State: uint32
Protect: uint32
Type: uint32
__alignment2: uint32align(4)
struct MINIDUMP_MEMORY_INFO
{
ulong BaseAddress;
ulong AllocationBase;
uint AllocationProtect;
uint __alignment1;
ulong RegionSize;
uint State;
uint Protect;
uint Type;
uint __alignment2;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; MINIDUMP_MEMORY_INFO サイズ: 48 バイト(x64)
dim st, 12 ; 4byte整数×12(構造体サイズ 48 / 4 切り上げ)
; BaseAddress : ULONGLONG (+0, 8byte) qpoke st,0,値 / qpeek(st,0) ※IronHSPのみ。3.7/3.8は lpoke st,0,下位 : lpoke st,4,上位
; AllocationBase : ULONGLONG (+8, 8byte) qpoke st,8,値 / qpeek(st,8) ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; AllocationProtect : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; __alignment1 : DWORD (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; RegionSize : ULONGLONG (+24, 8byte) qpoke st,24,値 / qpeek(st,24) ※IronHSPのみ。3.7/3.8は lpoke st,24,下位 : lpoke st,28,上位
; State : VIRTUAL_ALLOCATION_TYPE (+32, 4byte) st.8 = 値 / 値 = st.8 (lpoke/lpeek も可)
; Protect : DWORD (+36, 4byte) st.9 = 値 / 値 = st.9 (lpoke/lpeek も可)
; Type : DWORD (+40, 4byte) st.10 = 値 / 値 = st.10 (lpoke/lpeek も可)
; __alignment2 : DWORD (+44, 4byte) st.11 = 値 / 値 = st.11 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global MINIDUMP_MEMORY_INFO, pack=4
#field int64 BaseAddress
#field int64 AllocationBase
#field int AllocationProtect
#field int __alignment1
#field int64 RegionSize
#field int State
#field int Protect
#field int Type
#field int __alignment2
#endstruct
stdim st, MINIDUMP_MEMORY_INFO ; NSTRUCT 変数を確保
st->BaseAddress = 100
mes "BaseAddress=" + st->BaseAddress