ホーム › System.Diagnostics.Debug.Extensions › DEBUG_READ_USER_MINIDUMP_STREAM
DEBUG_READ_USER_MINIDUMP_STREAM
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| StreamType | DWORD | 4 | +0 | +0 | 読み出すミニダンプストリームの種類を示す値。 |
| Flags | DWORD | 4 | +4 | +4 | 読み出し動作を制御するフラグ。 |
| Offset | ULONGLONG | 8 | +8 | +8 | ストリーム内の読み出し開始オフセット。 |
| Buffer | void* | 8/4 | +16 | +16 | 読み出したデータを格納する出力バッファへのポインタ。 |
| BufferSize | DWORD | 4 | +24 | +20 | Bufferのバイトサイズ(入力で容量を指定)。 |
| BufferUsed | DWORD | 4 | +28 | +24 | 実際に書き込まれたバイト数(出力)。 |
各言語での定義
#include <windows.h>
// DEBUG_READ_USER_MINIDUMP_STREAM (x64 32 / x86 32 バイト)
typedef struct DEBUG_READ_USER_MINIDUMP_STREAM {
DWORD StreamType;
DWORD Flags;
ULONGLONG Offset;
void* Buffer;
DWORD BufferSize;
DWORD BufferUsed;
} DEBUG_READ_USER_MINIDUMP_STREAM;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DEBUG_READ_USER_MINIDUMP_STREAM
{
public uint StreamType;
public uint Flags;
public ulong Offset;
public IntPtr Buffer;
public uint BufferSize;
public uint BufferUsed;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure DEBUG_READ_USER_MINIDUMP_STREAM
Public StreamType As UInteger
Public Flags As UInteger
Public Offset As ULong
Public Buffer As IntPtr
Public BufferSize As UInteger
Public BufferUsed As UInteger
End Structureimport ctypes
from ctypes import wintypes
class DEBUG_READ_USER_MINIDUMP_STREAM(ctypes.Structure):
_fields_ = [
("StreamType", wintypes.DWORD),
("Flags", wintypes.DWORD),
("Offset", ctypes.c_ulonglong),
("Buffer", ctypes.c_void_p),
("BufferSize", wintypes.DWORD),
("BufferUsed", wintypes.DWORD),
]#[repr(C)]
pub struct DEBUG_READ_USER_MINIDUMP_STREAM {
pub StreamType: u32,
pub Flags: u32,
pub Offset: u64,
pub Buffer: *mut core::ffi::c_void,
pub BufferSize: u32,
pub BufferUsed: u32,
}import "golang.org/x/sys/windows"
type DEBUG_READ_USER_MINIDUMP_STREAM struct {
StreamType uint32
Flags uint32
Offset uint64
Buffer uintptr
BufferSize uint32
BufferUsed uint32
}type
DEBUG_READ_USER_MINIDUMP_STREAM = record
StreamType: DWORD;
Flags: DWORD;
Offset: UInt64;
Buffer: Pointer;
BufferSize: DWORD;
BufferUsed: DWORD;
end;const DEBUG_READ_USER_MINIDUMP_STREAM = extern struct {
StreamType: u32,
Flags: u32,
Offset: u64,
Buffer: ?*anyopaque,
BufferSize: u32,
BufferUsed: u32,
};type
DEBUG_READ_USER_MINIDUMP_STREAM {.bycopy.} = object
StreamType: uint32
Flags: uint32
Offset: uint64
Buffer: pointer
BufferSize: uint32
BufferUsed: uint32struct DEBUG_READ_USER_MINIDUMP_STREAM
{
uint StreamType;
uint Flags;
ulong Offset;
void* Buffer;
uint BufferSize;
uint BufferUsed;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; DEBUG_READ_USER_MINIDUMP_STREAM サイズ: 32 バイト(x86)
dim st, 8 ; 4byte整数×8(構造体サイズ 32 / 4 切り上げ)
; StreamType : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; Flags : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; Offset : ULONGLONG (+8, 8byte) qpoke st,8,値 / qpeek(st,8) ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; Buffer : void* (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; BufferSize : DWORD (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; BufferUsed : DWORD (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; DEBUG_READ_USER_MINIDUMP_STREAM サイズ: 32 バイト(x64)
dim st, 8 ; 4byte整数×8(構造体サイズ 32 / 4 切り上げ)
; StreamType : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; Flags : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; Offset : ULONGLONG (+8, 8byte) qpoke st,8,値 / qpeek(st,8) ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; Buffer : void* (+16, 8byte) qpoke st,16,値 / qpeek(st,16) ※IronHSPのみ。3.7/3.8は lpoke st,16,下位 : lpoke st,20,上位
; BufferSize : DWORD (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; BufferUsed : DWORD (+28, 4byte) st.7 = 値 / 値 = st.7 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global DEBUG_READ_USER_MINIDUMP_STREAM
#field int StreamType
#field int Flags
#field int64 Offset
#field intptr Buffer
#field int BufferSize
#field int BufferUsed
#endstruct
stdim st, DEBUG_READ_USER_MINIDUMP_STREAM ; NSTRUCT 変数を確保
st->StreamType = 100
mes "StreamType=" + st->StreamType