ホーム › Storage.IscsiDisc › DUMP_POINTERS
DUMP_POINTERS
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| AdapterObject | _ADAPTER_OBJECT* | 8/4 | +0 | +0 | DMAアダプタオブジェクトへのポインタ。 |
| MappedRegisterBase | void* | 8/4 | +8 | +4 | マップされたレジスタのベースアドレス。 |
| DumpData | void* | 8/4 | +16 | +8 | クラッシュダンプドライバー用データへのポインタ。 |
| CommonBufferVa | void* | 8/4 | +24 | +12 | 共通バッファの仮想アドレス。 |
| CommonBufferPa | LONGLONG | 8 | +32 | +16 | 共通バッファの物理アドレス。 |
| CommonBufferSize | DWORD | 4 | +40 | +24 | 共通バッファのバイトサイズ。 |
| AllocateCommonBuffers | BOOLEAN | 1 | +44 | +28 | 共通バッファの割り当てが必要ならTRUE。 |
| UseDiskDump | BOOLEAN | 1 | +45 | +29 | ディスクダンプ機構を使用すればTRUE。 |
| Spare1 | BYTE | 2 | +46 | +30 | 予約(スペア)フィールド。 |
| DeviceObject | void* | 8/4 | +48 | +32 | 対象デバイスオブジェクトへのポインタ。 |
各言語での定義
#include <windows.h>
// DUMP_POINTERS (x64 56 / x86 40 バイト)
typedef struct DUMP_POINTERS {
_ADAPTER_OBJECT* AdapterObject;
void* MappedRegisterBase;
void* DumpData;
void* CommonBufferVa;
LONGLONG CommonBufferPa;
DWORD CommonBufferSize;
BOOLEAN AllocateCommonBuffers;
BOOLEAN UseDiskDump;
BYTE Spare1[2];
void* DeviceObject;
} DUMP_POINTERS;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DUMP_POINTERS
{
public IntPtr AdapterObject;
public IntPtr MappedRegisterBase;
public IntPtr DumpData;
public IntPtr CommonBufferVa;
public long CommonBufferPa;
public uint CommonBufferSize;
[MarshalAs(UnmanagedType.U1)] public bool AllocateCommonBuffers;
[MarshalAs(UnmanagedType.U1)] public bool UseDiskDump;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)] public byte[] Spare1;
public IntPtr DeviceObject;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure DUMP_POINTERS
Public AdapterObject As IntPtr
Public MappedRegisterBase As IntPtr
Public DumpData As IntPtr
Public CommonBufferVa As IntPtr
Public CommonBufferPa As Long
Public CommonBufferSize As UInteger
<MarshalAs(UnmanagedType.U1)> Public AllocateCommonBuffers As Boolean
<MarshalAs(UnmanagedType.U1)> Public UseDiskDump As Boolean
<MarshalAs(UnmanagedType.ByValArray, SizeConst:=2)> Public Spare1() As Byte
Public DeviceObject As IntPtr
End Structureimport ctypes
from ctypes import wintypes
class DUMP_POINTERS(ctypes.Structure):
_fields_ = [
("AdapterObject", ctypes.c_void_p),
("MappedRegisterBase", ctypes.c_void_p),
("DumpData", ctypes.c_void_p),
("CommonBufferVa", ctypes.c_void_p),
("CommonBufferPa", ctypes.c_longlong),
("CommonBufferSize", wintypes.DWORD),
("AllocateCommonBuffers", ctypes.c_byte),
("UseDiskDump", ctypes.c_byte),
("Spare1", ctypes.c_ubyte * 2),
("DeviceObject", ctypes.c_void_p),
]#[repr(C)]
pub struct DUMP_POINTERS {
pub AdapterObject: *mut core::ffi::c_void,
pub MappedRegisterBase: *mut core::ffi::c_void,
pub DumpData: *mut core::ffi::c_void,
pub CommonBufferVa: *mut core::ffi::c_void,
pub CommonBufferPa: i64,
pub CommonBufferSize: u32,
pub AllocateCommonBuffers: u8,
pub UseDiskDump: u8,
pub Spare1: [u8; 2],
pub DeviceObject: *mut core::ffi::c_void,
}import "golang.org/x/sys/windows"
type DUMP_POINTERS struct {
AdapterObject uintptr
MappedRegisterBase uintptr
DumpData uintptr
CommonBufferVa uintptr
CommonBufferPa int64
CommonBufferSize uint32
AllocateCommonBuffers byte
UseDiskDump byte
Spare1 [2]byte
DeviceObject uintptr
}type
DUMP_POINTERS = record
AdapterObject: Pointer;
MappedRegisterBase: Pointer;
DumpData: Pointer;
CommonBufferVa: Pointer;
CommonBufferPa: Int64;
CommonBufferSize: DWORD;
AllocateCommonBuffers: ByteBool;
UseDiskDump: ByteBool;
Spare1: array[0..1] of Byte;
DeviceObject: Pointer;
end;const DUMP_POINTERS = extern struct {
AdapterObject: ?*anyopaque,
MappedRegisterBase: ?*anyopaque,
DumpData: ?*anyopaque,
CommonBufferVa: ?*anyopaque,
CommonBufferPa: i64,
CommonBufferSize: u32,
AllocateCommonBuffers: u8,
UseDiskDump: u8,
Spare1: [2]u8,
DeviceObject: ?*anyopaque,
};type
DUMP_POINTERS {.bycopy.} = object
AdapterObject: pointer
MappedRegisterBase: pointer
DumpData: pointer
CommonBufferVa: pointer
CommonBufferPa: int64
CommonBufferSize: uint32
AllocateCommonBuffers: uint8
UseDiskDump: uint8
Spare1: array[2, uint8]
DeviceObject: pointerstruct DUMP_POINTERS
{
void* AdapterObject;
void* MappedRegisterBase;
void* DumpData;
void* CommonBufferVa;
long CommonBufferPa;
uint CommonBufferSize;
ubyte AllocateCommonBuffers;
ubyte UseDiskDump;
ubyte[2] Spare1;
void* DeviceObject;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; DUMP_POINTERS サイズ: 40 バイト(x86)
dim st, 10 ; 4byte整数×10(構造体サイズ 40 / 4 切り上げ)
; AdapterObject : _ADAPTER_OBJECT* (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; MappedRegisterBase : void* (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; DumpData : void* (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; CommonBufferVa : void* (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; CommonBufferPa : LONGLONG (+16, 8byte) qpoke st,16,値 / qpeek(st,16) ※IronHSPのみ。3.7/3.8は lpoke st,16,下位 : lpoke st,20,上位
; CommonBufferSize : DWORD (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; AllocateCommonBuffers : BOOLEAN (+28, 1byte) poke st,28,値 / 値 = peek(st,28)
; UseDiskDump : BOOLEAN (+29, 1byte) poke st,29,値 / 値 = peek(st,29)
; Spare1 : BYTE (+30, 2byte) varptr(st)+30 を基点に操作(2byte:入れ子/配列)
; DeviceObject : void* (+32, 4byte) st.8 = 値 / 値 = st.8 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; DUMP_POINTERS サイズ: 56 バイト(x64)
dim st, 14 ; 4byte整数×14(構造体サイズ 56 / 4 切り上げ)
; AdapterObject : _ADAPTER_OBJECT* (+0, 8byte) qpoke st,0,値 / qpeek(st,0) ※IronHSPのみ。3.7/3.8は lpoke st,0,下位 : lpoke st,4,上位
; MappedRegisterBase : void* (+8, 8byte) qpoke st,8,値 / qpeek(st,8) ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; DumpData : void* (+16, 8byte) qpoke st,16,値 / qpeek(st,16) ※IronHSPのみ。3.7/3.8は lpoke st,16,下位 : lpoke st,20,上位
; CommonBufferVa : void* (+24, 8byte) qpoke st,24,値 / qpeek(st,24) ※IronHSPのみ。3.7/3.8は lpoke st,24,下位 : lpoke st,28,上位
; CommonBufferPa : LONGLONG (+32, 8byte) qpoke st,32,値 / qpeek(st,32) ※IronHSPのみ。3.7/3.8は lpoke st,32,下位 : lpoke st,36,上位
; CommonBufferSize : DWORD (+40, 4byte) st.10 = 値 / 値 = st.10 (lpoke/lpeek も可)
; AllocateCommonBuffers : BOOLEAN (+44, 1byte) poke st,44,値 / 値 = peek(st,44)
; UseDiskDump : BOOLEAN (+45, 1byte) poke st,45,値 / 値 = peek(st,45)
; Spare1 : BYTE (+46, 2byte) varptr(st)+46 を基点に操作(2byte:入れ子/配列)
; DeviceObject : void* (+48, 8byte) qpoke st,48,値 / qpeek(st,48) ※IronHSPのみ。3.7/3.8は lpoke st,48,下位 : lpoke st,52,上位
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global DUMP_POINTERS
#field intptr AdapterObject
#field intptr MappedRegisterBase
#field intptr DumpData
#field intptr CommonBufferVa
#field int64 CommonBufferPa
#field int CommonBufferSize
#field bool1 AllocateCommonBuffers
#field bool1 UseDiskDump
#field byte Spare1 2
#field intptr DeviceObject
#endstruct
stdim st, DUMP_POINTERS ; NSTRUCT 変数を確保
st->CommonBufferPa = 100
mes "CommonBufferPa=" + st->CommonBufferPa