ホーム › System.ErrorReporting › WER_REPORT_INFORMATION_V3
WER_REPORT_INFORMATION_V3
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| dwSize | DWORD | 4 | +0 | +0 | 本構造体のバイトサイズ。使用前に設定が必要。 |
| hProcess | HANDLE | 8/4 | +8 | +4 | レポート対象プロセスのハンドル。NULLで現プロセス。 |
| wzConsentKey | WCHAR | 128 | +16 | +8 | ユーザー同意設定を参照する一意キー(ワイド文字列)。 |
| wzFriendlyEventName | WCHAR | 256 | +144 | +136 | ユーザーに表示するイベント名(ワイド文字列)。 |
| wzApplicationName | WCHAR | 256 | +400 | +392 | アプリケーション名(ワイド文字列)。 |
| wzApplicationPath | WCHAR | 520 | +656 | +648 | アプリケーションの実行パス(ワイド文字列)。 |
| wzDescription | WCHAR | 1024 | +1176 | +1168 | 問題の説明文(ワイド文字列)。 |
| hwndParent | HWND | 8/4 | +2200 | +2192 | UIダイアログの親ウィンドウハンドル。NULL可。 |
| wzNamespacePartner | WCHAR | 128 | +2208 | +2196 | レポート分類用の名前空間パートナー(ワイド文字列)。 |
| wzNamespaceGroup | WCHAR | 128 | +2336 | +2324 | レポート分類用の名前空間グループ(ワイド文字列)。 |
各言語での定義
#include <windows.h>
// WER_REPORT_INFORMATION_V3 (x64 2464 / x86 2452 バイト)
typedef struct WER_REPORT_INFORMATION_V3 {
DWORD dwSize;
HANDLE hProcess;
WCHAR wzConsentKey[64];
WCHAR wzFriendlyEventName[128];
WCHAR wzApplicationName[128];
WCHAR wzApplicationPath[260];
WCHAR wzDescription[512];
HWND hwndParent;
WCHAR wzNamespacePartner[64];
WCHAR wzNamespaceGroup[64];
} WER_REPORT_INFORMATION_V3;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct WER_REPORT_INFORMATION_V3
{
public uint dwSize;
public IntPtr hProcess;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 64)] public string wzConsentKey;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 128)] public string wzFriendlyEventName;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 128)] public string wzApplicationName;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 260)] public string wzApplicationPath;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 512)] public string wzDescription;
public IntPtr hwndParent;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 64)] public string wzNamespacePartner;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 64)] public string wzNamespaceGroup;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure WER_REPORT_INFORMATION_V3
Public dwSize As UInteger
Public hProcess As IntPtr
<MarshalAs(UnmanagedType.ByValTStr, SizeConst:=64)> Public wzConsentKey As String
<MarshalAs(UnmanagedType.ByValTStr, SizeConst:=128)> Public wzFriendlyEventName As String
<MarshalAs(UnmanagedType.ByValTStr, SizeConst:=128)> Public wzApplicationName As String
<MarshalAs(UnmanagedType.ByValTStr, SizeConst:=260)> Public wzApplicationPath As String
<MarshalAs(UnmanagedType.ByValTStr, SizeConst:=512)> Public wzDescription As String
Public hwndParent As IntPtr
<MarshalAs(UnmanagedType.ByValTStr, SizeConst:=64)> Public wzNamespacePartner As String
<MarshalAs(UnmanagedType.ByValTStr, SizeConst:=64)> Public wzNamespaceGroup As String
End Structureimport ctypes
from ctypes import wintypes
class WER_REPORT_INFORMATION_V3(ctypes.Structure):
_fields_ = [
("dwSize", wintypes.DWORD),
("hProcess", ctypes.c_void_p),
("wzConsentKey", ctypes.c_wchar * 64),
("wzFriendlyEventName", ctypes.c_wchar * 128),
("wzApplicationName", ctypes.c_wchar * 128),
("wzApplicationPath", ctypes.c_wchar * 260),
("wzDescription", ctypes.c_wchar * 512),
("hwndParent", ctypes.c_void_p),
("wzNamespacePartner", ctypes.c_wchar * 64),
("wzNamespaceGroup", ctypes.c_wchar * 64),
]#[repr(C)]
pub struct WER_REPORT_INFORMATION_V3 {
pub dwSize: u32,
pub hProcess: *mut core::ffi::c_void,
pub wzConsentKey: [u16; 64],
pub wzFriendlyEventName: [u16; 128],
pub wzApplicationName: [u16; 128],
pub wzApplicationPath: [u16; 260],
pub wzDescription: [u16; 512],
pub hwndParent: *mut core::ffi::c_void,
pub wzNamespacePartner: [u16; 64],
pub wzNamespaceGroup: [u16; 64],
}import "golang.org/x/sys/windows"
type WER_REPORT_INFORMATION_V3 struct {
dwSize uint32
hProcess uintptr
wzConsentKey [64]uint16
wzFriendlyEventName [128]uint16
wzApplicationName [128]uint16
wzApplicationPath [260]uint16
wzDescription [512]uint16
hwndParent uintptr
wzNamespacePartner [64]uint16
wzNamespaceGroup [64]uint16
}type
WER_REPORT_INFORMATION_V3 = record
dwSize: DWORD;
hProcess: Pointer;
wzConsentKey: array[0..63] of WideChar;
wzFriendlyEventName: array[0..127] of WideChar;
wzApplicationName: array[0..127] of WideChar;
wzApplicationPath: array[0..259] of WideChar;
wzDescription: array[0..511] of WideChar;
hwndParent: Pointer;
wzNamespacePartner: array[0..63] of WideChar;
wzNamespaceGroup: array[0..63] of WideChar;
end;const WER_REPORT_INFORMATION_V3 = extern struct {
dwSize: u32,
hProcess: ?*anyopaque,
wzConsentKey: [64]u16,
wzFriendlyEventName: [128]u16,
wzApplicationName: [128]u16,
wzApplicationPath: [260]u16,
wzDescription: [512]u16,
hwndParent: ?*anyopaque,
wzNamespacePartner: [64]u16,
wzNamespaceGroup: [64]u16,
};type
WER_REPORT_INFORMATION_V3 {.bycopy.} = object
dwSize: uint32
hProcess: pointer
wzConsentKey: array[64, uint16]
wzFriendlyEventName: array[128, uint16]
wzApplicationName: array[128, uint16]
wzApplicationPath: array[260, uint16]
wzDescription: array[512, uint16]
hwndParent: pointer
wzNamespacePartner: array[64, uint16]
wzNamespaceGroup: array[64, uint16]struct WER_REPORT_INFORMATION_V3
{
uint dwSize;
void* hProcess;
wchar[64] wzConsentKey;
wchar[128] wzFriendlyEventName;
wchar[128] wzApplicationName;
wchar[260] wzApplicationPath;
wchar[512] wzDescription;
void* hwndParent;
wchar[64] wzNamespacePartner;
wchar[64] wzNamespaceGroup;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; WER_REPORT_INFORMATION_V3 サイズ: 2452 バイト(x86)
dim st, 613 ; 4byte整数×613(構造体サイズ 2452 / 4 切り上げ)
; dwSize : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; hProcess : HANDLE (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; wzConsentKey : WCHAR (+8, 128byte) varptr(st)+8 を基点に操作(128byte:入れ子/配列)
; wzFriendlyEventName : WCHAR (+136, 256byte) varptr(st)+136 を基点に操作(256byte:入れ子/配列)
; wzApplicationName : WCHAR (+392, 256byte) varptr(st)+392 を基点に操作(256byte:入れ子/配列)
; wzApplicationPath : WCHAR (+648, 520byte) varptr(st)+648 を基点に操作(520byte:入れ子/配列)
; wzDescription : WCHAR (+1168, 1024byte) varptr(st)+1168 を基点に操作(1024byte:入れ子/配列)
; hwndParent : HWND (+2192, 4byte) st.548 = 値 / 値 = st.548 (lpoke/lpeek も可)
; wzNamespacePartner : WCHAR (+2196, 128byte) varptr(st)+2196 を基点に操作(128byte:入れ子/配列)
; wzNamespaceGroup : WCHAR (+2324, 128byte) varptr(st)+2324 を基点に操作(128byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; WER_REPORT_INFORMATION_V3 サイズ: 2464 バイト(x64)
dim st, 616 ; 4byte整数×616(構造体サイズ 2464 / 4 切り上げ)
; dwSize : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; hProcess : HANDLE (+8, 8byte) qpoke st,8,値 / qpeek(st,8) ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; wzConsentKey : WCHAR (+16, 128byte) varptr(st)+16 を基点に操作(128byte:入れ子/配列)
; wzFriendlyEventName : WCHAR (+144, 256byte) varptr(st)+144 を基点に操作(256byte:入れ子/配列)
; wzApplicationName : WCHAR (+400, 256byte) varptr(st)+400 を基点に操作(256byte:入れ子/配列)
; wzApplicationPath : WCHAR (+656, 520byte) varptr(st)+656 を基点に操作(520byte:入れ子/配列)
; wzDescription : WCHAR (+1176, 1024byte) varptr(st)+1176 を基点に操作(1024byte:入れ子/配列)
; hwndParent : HWND (+2200, 8byte) qpoke st,2200,値 / qpeek(st,2200) ※IronHSPのみ。3.7/3.8は lpoke st,2200,下位 : lpoke st,2204,上位
; wzNamespacePartner : WCHAR (+2208, 128byte) varptr(st)+2208 を基点に操作(128byte:入れ子/配列)
; wzNamespaceGroup : WCHAR (+2336, 128byte) varptr(st)+2336 を基点に操作(128byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global WER_REPORT_INFORMATION_V3
#field int dwSize
#field intptr hProcess
#field wchar wzConsentKey 64
#field wchar wzFriendlyEventName 128
#field wchar wzApplicationName 128
#field wchar wzApplicationPath 260
#field wchar wzDescription 512
#field intptr hwndParent
#field wchar wzNamespacePartner 64
#field wchar wzNamespaceGroup 64
#endstruct
stdim st, WER_REPORT_INFORMATION_V3 ; NSTRUCT 変数を確保
st->dwSize = 100
mes "dwSize=" + st->dwSize