ホーム › System.Diagnostics.Debug.Extensions › DEBUG_EXCEPTION_FILTER_PARAMETERS
DEBUG_EXCEPTION_FILTER_PARAMETERS
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| ExecutionOption | DWORD | 4 | +0 | +0 | 例外発生時の実行オプション(中断/出力/無視等)。 |
| ContinueOption | DWORD | 4 | +4 | +4 | 例外処理後の継続オプション(処理/未処理)。 |
| TextSize | DWORD | 4 | +8 | +8 | 例外説明テキストの長さ。 |
| CommandSize | DWORD | 4 | +12 | +12 | 第一機会例外時に実行するコマンド文字列の長さ。 |
| SecondCommandSize | DWORD | 4 | +16 | +16 | 第二機会例外時に実行するコマンド文字列の長さ。 |
| ExceptionCode | DWORD | 4 | +20 | +20 | 対象とする例外コード(NTSTATUS値)。 |
各言語での定義
#include <windows.h>
// DEBUG_EXCEPTION_FILTER_PARAMETERS (x64 24 / x86 24 バイト)
typedef struct DEBUG_EXCEPTION_FILTER_PARAMETERS {
DWORD ExecutionOption;
DWORD ContinueOption;
DWORD TextSize;
DWORD CommandSize;
DWORD SecondCommandSize;
DWORD ExceptionCode;
} DEBUG_EXCEPTION_FILTER_PARAMETERS;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DEBUG_EXCEPTION_FILTER_PARAMETERS
{
public uint ExecutionOption;
public uint ContinueOption;
public uint TextSize;
public uint CommandSize;
public uint SecondCommandSize;
public uint ExceptionCode;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure DEBUG_EXCEPTION_FILTER_PARAMETERS
Public ExecutionOption As UInteger
Public ContinueOption As UInteger
Public TextSize As UInteger
Public CommandSize As UInteger
Public SecondCommandSize As UInteger
Public ExceptionCode As UInteger
End Structureimport ctypes
from ctypes import wintypes
class DEBUG_EXCEPTION_FILTER_PARAMETERS(ctypes.Structure):
_fields_ = [
("ExecutionOption", wintypes.DWORD),
("ContinueOption", wintypes.DWORD),
("TextSize", wintypes.DWORD),
("CommandSize", wintypes.DWORD),
("SecondCommandSize", wintypes.DWORD),
("ExceptionCode", wintypes.DWORD),
]#[repr(C)]
pub struct DEBUG_EXCEPTION_FILTER_PARAMETERS {
pub ExecutionOption: u32,
pub ContinueOption: u32,
pub TextSize: u32,
pub CommandSize: u32,
pub SecondCommandSize: u32,
pub ExceptionCode: u32,
}import "golang.org/x/sys/windows"
type DEBUG_EXCEPTION_FILTER_PARAMETERS struct {
ExecutionOption uint32
ContinueOption uint32
TextSize uint32
CommandSize uint32
SecondCommandSize uint32
ExceptionCode uint32
}type
DEBUG_EXCEPTION_FILTER_PARAMETERS = record
ExecutionOption: DWORD;
ContinueOption: DWORD;
TextSize: DWORD;
CommandSize: DWORD;
SecondCommandSize: DWORD;
ExceptionCode: DWORD;
end;const DEBUG_EXCEPTION_FILTER_PARAMETERS = extern struct {
ExecutionOption: u32,
ContinueOption: u32,
TextSize: u32,
CommandSize: u32,
SecondCommandSize: u32,
ExceptionCode: u32,
};type
DEBUG_EXCEPTION_FILTER_PARAMETERS {.bycopy.} = object
ExecutionOption: uint32
ContinueOption: uint32
TextSize: uint32
CommandSize: uint32
SecondCommandSize: uint32
ExceptionCode: uint32struct DEBUG_EXCEPTION_FILTER_PARAMETERS
{
uint ExecutionOption;
uint ContinueOption;
uint TextSize;
uint CommandSize;
uint SecondCommandSize;
uint ExceptionCode;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; DEBUG_EXCEPTION_FILTER_PARAMETERS サイズ: 24 バイト(x64)
dim st, 6 ; 4byte整数×6(構造体サイズ 24 / 4 切り上げ)
; ExecutionOption : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; ContinueOption : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; TextSize : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; CommandSize : DWORD (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; SecondCommandSize : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; ExceptionCode : DWORD (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global DEBUG_EXCEPTION_FILTER_PARAMETERS
#field int ExecutionOption
#field int ContinueOption
#field int TextSize
#field int CommandSize
#field int SecondCommandSize
#field int ExceptionCode
#endstruct
stdim st, DEBUG_EXCEPTION_FILTER_PARAMETERS ; NSTRUCT 変数を確保
st->ExecutionOption = 100
mes "ExecutionOption=" + st->ExecutionOption