Win32 API 日本語リファレンス
ホームStorage.IscsiDisc › DUMP_POINTERS_EX

DUMP_POINTERS_EX

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

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

フィールド

フィールドサイズx64x86説明
HeaderDUMP_POINTERS_VERSION8+0+0バージョン/サイズを保持するDUMP_POINTERS_VERSIONヘッダー。
DumpDatavoid*8/4+8+8クラッシュダンプドライバー用データへのポインタ。
CommonBufferVavoid*8/4+16+12共通バッファの仮想アドレス。
CommonBufferSizeDWORD4+24+16共通バッファのバイトサイズ。
AllocateCommonBuffersBOOLEAN1+28+20共通バッファの割り当てが必要ならTRUE。
DeviceObjectvoid*8/4+32+24対象デバイスオブジェクトへのポインタ。
DriverListvoid*8/4+40+28関連ドライバーのリストへのポインタ。
dwPortFlagsDWORD4+48+32ポートの動作フラグ。
MaxDeviceDumpSectionSizeDWORD4+52+36デバイスダンプの最大セクションサイズ(バイト)。
MaxDeviceDumpLevelDWORD4+56+40サポートされるデバイスダンプの最大レベル。
MaxTransferSizeDWORD4+60+441回の転送で扱える最大バイト数。
AdapterObjectvoid*8/4+64+48DMAアダプタオブジェクトへのポインタ。
MappedRegisterBasevoid*8/4+72+52マップされたレジスタのベースアドレス。
DeviceReadyBOOLEAN*8/4+80+56デバイスの準備完了状態を示すBOOLEANへのポインタ。
DumpDevicePowerOnPDUMP_DEVICE_POWERON_ROUTINE8/4+88+60ダンプ時にデバイスを電源投入するコールバック関数へのポインタ。
DumpDevicePowerOnContextvoid*8/4+96+64電源投入コールバックに渡すコンテキスト。

各言語での定義

#include <windows.h>

// DUMP_POINTERS_VERSION  (x64 8 / x86 8 バイト)
typedef struct DUMP_POINTERS_VERSION {
    DWORD Version;
    DWORD Size;
} DUMP_POINTERS_VERSION;

// DUMP_POINTERS_EX  (x64 104 / x86 68 バイト)
typedef struct DUMP_POINTERS_EX {
    DUMP_POINTERS_VERSION Header;
    void* DumpData;
    void* CommonBufferVa;
    DWORD CommonBufferSize;
    BOOLEAN AllocateCommonBuffers;
    void* DeviceObject;
    void* DriverList;
    DWORD dwPortFlags;
    DWORD MaxDeviceDumpSectionSize;
    DWORD MaxDeviceDumpLevel;
    DWORD MaxTransferSize;
    void* AdapterObject;
    void* MappedRegisterBase;
    BOOLEAN* DeviceReady;
    PDUMP_DEVICE_POWERON_ROUTINE DumpDevicePowerOn;
    void* DumpDevicePowerOnContext;
} DUMP_POINTERS_EX;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DUMP_POINTERS_VERSION
{
    public uint Version;
    public uint Size;
}

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DUMP_POINTERS_EX
{
    public DUMP_POINTERS_VERSION Header;
    public IntPtr DumpData;
    public IntPtr CommonBufferVa;
    public uint CommonBufferSize;
    [MarshalAs(UnmanagedType.U1)] public bool AllocateCommonBuffers;
    public IntPtr DeviceObject;
    public IntPtr DriverList;
    public uint dwPortFlags;
    public uint MaxDeviceDumpSectionSize;
    public uint MaxDeviceDumpLevel;
    public uint MaxTransferSize;
    public IntPtr AdapterObject;
    public IntPtr MappedRegisterBase;
    [MarshalAs(UnmanagedType.U1)] public bool DeviceReady;
    public IntPtr DumpDevicePowerOn;
    public IntPtr DumpDevicePowerOnContext;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure DUMP_POINTERS_VERSION
    Public Version As UInteger
    Public Size As UInteger
End Structure

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure DUMP_POINTERS_EX
    Public Header As DUMP_POINTERS_VERSION
    Public DumpData As IntPtr
    Public CommonBufferVa As IntPtr
    Public CommonBufferSize As UInteger
    <MarshalAs(UnmanagedType.U1)> Public AllocateCommonBuffers As Boolean
    Public DeviceObject As IntPtr
    Public DriverList As IntPtr
    Public dwPortFlags As UInteger
    Public MaxDeviceDumpSectionSize As UInteger
    Public MaxDeviceDumpLevel As UInteger
    Public MaxTransferSize As UInteger
    Public AdapterObject As IntPtr
    Public MappedRegisterBase As IntPtr
    <MarshalAs(UnmanagedType.U1)> Public DeviceReady As Boolean
    Public DumpDevicePowerOn As IntPtr
    Public DumpDevicePowerOnContext As IntPtr
End Structure
import ctypes
from ctypes import wintypes

class DUMP_POINTERS_VERSION(ctypes.Structure):
    _fields_ = [
        ("Version", wintypes.DWORD),
        ("Size", wintypes.DWORD),
    ]

class DUMP_POINTERS_EX(ctypes.Structure):
    _fields_ = [
        ("Header", DUMP_POINTERS_VERSION),
        ("DumpData", ctypes.c_void_p),
        ("CommonBufferVa", ctypes.c_void_p),
        ("CommonBufferSize", wintypes.DWORD),
        ("AllocateCommonBuffers", ctypes.c_byte),
        ("DeviceObject", ctypes.c_void_p),
        ("DriverList", ctypes.c_void_p),
        ("dwPortFlags", wintypes.DWORD),
        ("MaxDeviceDumpSectionSize", wintypes.DWORD),
        ("MaxDeviceDumpLevel", wintypes.DWORD),
        ("MaxTransferSize", wintypes.DWORD),
        ("AdapterObject", ctypes.c_void_p),
        ("MappedRegisterBase", ctypes.c_void_p),
        ("DeviceReady", ctypes.c_void_p),
        ("DumpDevicePowerOn", ctypes.c_void_p),
        ("DumpDevicePowerOnContext", ctypes.c_void_p),
    ]
#[repr(C)]
pub struct DUMP_POINTERS_VERSION {
    pub Version: u32,
    pub Size: u32,
}

#[repr(C)]
pub struct DUMP_POINTERS_EX {
    pub Header: DUMP_POINTERS_VERSION,
    pub DumpData: *mut core::ffi::c_void,
    pub CommonBufferVa: *mut core::ffi::c_void,
    pub CommonBufferSize: u32,
    pub AllocateCommonBuffers: u8,
    pub DeviceObject: *mut core::ffi::c_void,
    pub DriverList: *mut core::ffi::c_void,
    pub dwPortFlags: u32,
    pub MaxDeviceDumpSectionSize: u32,
    pub MaxDeviceDumpLevel: u32,
    pub MaxTransferSize: u32,
    pub AdapterObject: *mut core::ffi::c_void,
    pub MappedRegisterBase: *mut core::ffi::c_void,
    pub DeviceReady: *mut core::ffi::c_void,
    pub DumpDevicePowerOn: *mut core::ffi::c_void,
    pub DumpDevicePowerOnContext: *mut core::ffi::c_void,
}
import "golang.org/x/sys/windows"

type DUMP_POINTERS_VERSION struct {
	Version uint32
	Size uint32
}

type DUMP_POINTERS_EX struct {
	Header DUMP_POINTERS_VERSION
	DumpData uintptr
	CommonBufferVa uintptr
	CommonBufferSize uint32
	AllocateCommonBuffers byte
	DeviceObject uintptr
	DriverList uintptr
	dwPortFlags uint32
	MaxDeviceDumpSectionSize uint32
	MaxDeviceDumpLevel uint32
	MaxTransferSize uint32
	AdapterObject uintptr
	MappedRegisterBase uintptr
	DeviceReady uintptr
	DumpDevicePowerOn uintptr
	DumpDevicePowerOnContext uintptr
}
type
  DUMP_POINTERS_VERSION = record
    Version: DWORD;
    Size: DWORD;
  end;

  DUMP_POINTERS_EX = record
    Header: DUMP_POINTERS_VERSION;
    DumpData: Pointer;
    CommonBufferVa: Pointer;
    CommonBufferSize: DWORD;
    AllocateCommonBuffers: ByteBool;
    DeviceObject: Pointer;
    DriverList: Pointer;
    dwPortFlags: DWORD;
    MaxDeviceDumpSectionSize: DWORD;
    MaxDeviceDumpLevel: DWORD;
    MaxTransferSize: DWORD;
    AdapterObject: Pointer;
    MappedRegisterBase: Pointer;
    DeviceReady: Pointer;
    DumpDevicePowerOn: Pointer;
    DumpDevicePowerOnContext: Pointer;
  end;
const DUMP_POINTERS_VERSION = extern struct {
    Version: u32,
    Size: u32,
};

const DUMP_POINTERS_EX = extern struct {
    Header: DUMP_POINTERS_VERSION,
    DumpData: ?*anyopaque,
    CommonBufferVa: ?*anyopaque,
    CommonBufferSize: u32,
    AllocateCommonBuffers: u8,
    DeviceObject: ?*anyopaque,
    DriverList: ?*anyopaque,
    dwPortFlags: u32,
    MaxDeviceDumpSectionSize: u32,
    MaxDeviceDumpLevel: u32,
    MaxTransferSize: u32,
    AdapterObject: ?*anyopaque,
    MappedRegisterBase: ?*anyopaque,
    DeviceReady: ?*anyopaque,
    DumpDevicePowerOn: ?*anyopaque,
    DumpDevicePowerOnContext: ?*anyopaque,
};
type
  DUMP_POINTERS_VERSION {.bycopy.} = object
    Version: uint32
    Size: uint32

  DUMP_POINTERS_EX {.bycopy.} = object
    Header: DUMP_POINTERS_VERSION
    DumpData: pointer
    CommonBufferVa: pointer
    CommonBufferSize: uint32
    AllocateCommonBuffers: uint8
    DeviceObject: pointer
    DriverList: pointer
    dwPortFlags: uint32
    MaxDeviceDumpSectionSize: uint32
    MaxDeviceDumpLevel: uint32
    MaxTransferSize: uint32
    AdapterObject: pointer
    MappedRegisterBase: pointer
    DeviceReady: pointer
    DumpDevicePowerOn: pointer
    DumpDevicePowerOnContext: pointer
struct DUMP_POINTERS_VERSION
{
    uint Version;
    uint Size;
}

struct DUMP_POINTERS_EX
{
    DUMP_POINTERS_VERSION Header;
    void* DumpData;
    void* CommonBufferVa;
    uint CommonBufferSize;
    ubyte AllocateCommonBuffers;
    void* DeviceObject;
    void* DriverList;
    uint dwPortFlags;
    uint MaxDeviceDumpSectionSize;
    uint MaxDeviceDumpLevel;
    uint MaxTransferSize;
    void* AdapterObject;
    void* MappedRegisterBase;
    void* DeviceReady;
    void* DumpDevicePowerOn;
    void* DumpDevicePowerOnContext;
}

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_EX サイズ: 68 バイト(x86)
dim st, 17    ; 4byte整数×17(構造体サイズ 68 / 4 切り上げ)
; Header : DUMP_POINTERS_VERSION (+0, 8byte)  varptr(st)+0 を基点に操作(8byte:入れ子/配列)
; DumpData : void* (+8, 4byte)  st.2 = 値  /  値 = st.2   (lpoke/lpeek も可)
; CommonBufferVa : void* (+12, 4byte)  st.3 = 値  /  値 = st.3   (lpoke/lpeek も可)
; CommonBufferSize : DWORD (+16, 4byte)  st.4 = 値  /  値 = st.4   (lpoke/lpeek も可)
; AllocateCommonBuffers : BOOLEAN (+20, 1byte)  poke st,20,値  /  値 = peek(st,20)
; DeviceObject : void* (+24, 4byte)  st.6 = 値  /  値 = st.6   (lpoke/lpeek も可)
; DriverList : void* (+28, 4byte)  st.7 = 値  /  値 = st.7   (lpoke/lpeek も可)
; dwPortFlags : DWORD (+32, 4byte)  st.8 = 値  /  値 = st.8   (lpoke/lpeek も可)
; MaxDeviceDumpSectionSize : DWORD (+36, 4byte)  st.9 = 値  /  値 = st.9   (lpoke/lpeek も可)
; MaxDeviceDumpLevel : DWORD (+40, 4byte)  st.10 = 値  /  値 = st.10   (lpoke/lpeek も可)
; MaxTransferSize : DWORD (+44, 4byte)  st.11 = 値  /  値 = st.11   (lpoke/lpeek も可)
; AdapterObject : void* (+48, 4byte)  st.12 = 値  /  値 = st.12   (lpoke/lpeek も可)
; MappedRegisterBase : void* (+52, 4byte)  st.13 = 値  /  値 = st.13   (lpoke/lpeek も可)
; DeviceReady : BOOLEAN* (+56, 4byte)  st.14 = 値  /  値 = st.14   (lpoke/lpeek も可)
; DumpDevicePowerOn : PDUMP_DEVICE_POWERON_ROUTINE (+60, 4byte)  st.15 = 値  /  値 = st.15   (lpoke/lpeek も可)
; DumpDevicePowerOnContext : void* (+64, 4byte)  st.16 = 値  /  値 = st.16   (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; DUMP_POINTERS_EX サイズ: 104 バイト(x64)
dim st, 26    ; 4byte整数×26(構造体サイズ 104 / 4 切り上げ)
; Header : DUMP_POINTERS_VERSION (+0, 8byte)  varptr(st)+0 を基点に操作(8byte:入れ子/配列)
; DumpData : void* (+8, 8byte)  qpoke st,8,値 / qpeek(st,8)  ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; CommonBufferVa : void* (+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)
; DeviceObject : void* (+32, 8byte)  qpoke st,32,値 / qpeek(st,32)  ※IronHSPのみ。3.7/3.8は lpoke st,32,下位 : lpoke st,36,上位
; DriverList : void* (+40, 8byte)  qpoke st,40,値 / qpeek(st,40)  ※IronHSPのみ。3.7/3.8は lpoke st,40,下位 : lpoke st,44,上位
; dwPortFlags : DWORD (+48, 4byte)  st.12 = 値  /  値 = st.12   (lpoke/lpeek も可)
; MaxDeviceDumpSectionSize : DWORD (+52, 4byte)  st.13 = 値  /  値 = st.13   (lpoke/lpeek も可)
; MaxDeviceDumpLevel : DWORD (+56, 4byte)  st.14 = 値  /  値 = st.14   (lpoke/lpeek も可)
; MaxTransferSize : DWORD (+60, 4byte)  st.15 = 値  /  値 = st.15   (lpoke/lpeek も可)
; AdapterObject : void* (+64, 8byte)  qpoke st,64,値 / qpeek(st,64)  ※IronHSPのみ。3.7/3.8は lpoke st,64,下位 : lpoke st,68,上位
; MappedRegisterBase : void* (+72, 8byte)  qpoke st,72,値 / qpeek(st,72)  ※IronHSPのみ。3.7/3.8は lpoke st,72,下位 : lpoke st,76,上位
; DeviceReady : BOOLEAN* (+80, 8byte)  qpoke st,80,値 / qpeek(st,80)  ※IronHSPのみ。3.7/3.8は lpoke st,80,下位 : lpoke st,84,上位
; DumpDevicePowerOn : PDUMP_DEVICE_POWERON_ROUTINE (+88, 8byte)  qpoke st,88,値 / qpeek(st,88)  ※IronHSPのみ。3.7/3.8は lpoke st,88,下位 : lpoke st,92,上位
; DumpDevicePowerOnContext : void* (+96, 8byte)  qpoke st,96,値 / qpeek(st,96)  ※IronHSPのみ。3.7/3.8は lpoke st,96,下位 : lpoke st,100,上位
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
; ※GUID・入れ子構造体はデフォルト型でないため、依存する #defstruct を先に定義(下記に同梱)。
#defstruct global DUMP_POINTERS_VERSION
    #field int Version
    #field int Size
#endstruct

#defstruct global DUMP_POINTERS_EX
    #field DUMP_POINTERS_VERSION Header
    #field intptr DumpData
    #field intptr CommonBufferVa
    #field int CommonBufferSize
    #field bool1 AllocateCommonBuffers
    #field intptr DeviceObject
    #field intptr DriverList
    #field int dwPortFlags
    #field int MaxDeviceDumpSectionSize
    #field int MaxDeviceDumpLevel
    #field int MaxTransferSize
    #field intptr AdapterObject
    #field intptr MappedRegisterBase
    #field intptr DeviceReady
    #field intptr DumpDevicePowerOn
    #field intptr DumpDevicePowerOnContext
#endstruct

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