ホーム › Graphics.Printing › ImgErrorInfo
ImgErrorInfo
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| description | LPWSTR | 8/4 | +0 | +0 | エラー内容を説明する文字列。NULL可。 |
| guid | GUID | 16 | +8 | +4 | エラーを一意に識別するGUID。 |
| helpContext | DWORD | 4 | +24 | +20 | ヘルプファイル内の該当ヘルプコンテキストID。 |
| helpFile | LPWSTR | 8/4 | +32 | +24 | 関連するヘルプファイルのパス。NULL可。 |
| source | LPWSTR | 8/4 | +40 | +28 | エラー発生元(コンポーネント名等)を示す文字列。 |
| devDescription | LPWSTR | 8/4 | +48 | +32 | 開発者向けの詳細なエラー説明文字列。 |
| errorID | GUID | 16 | +56 | +36 | 具体的なエラー種別を示すGUID。 |
| cUserParameters | DWORD | 4 | +72 | +52 | aUserParameters配列に含まれるユーザーパラメータ数。 |
| aUserParameters | LPWSTR* | 8/4 | +80 | +56 | エラーメッセージに埋め込むユーザーパラメータ文字列の配列。 |
| userFallback | LPWSTR | 8/4 | +88 | +60 | ユーザー向けフォールバックメッセージ文字列。 |
| exceptionID | DWORD | 4 | +96 | +64 | 対応する例外を識別するID。 |
各言語での定義
#include <windows.h>
// ImgErrorInfo (x64 104 / x86 68 バイト)
typedef struct ImgErrorInfo {
LPWSTR description;
GUID guid;
DWORD helpContext;
LPWSTR helpFile;
LPWSTR source;
LPWSTR devDescription;
GUID errorID;
DWORD cUserParameters;
LPWSTR* aUserParameters;
LPWSTR userFallback;
DWORD exceptionID;
} ImgErrorInfo;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct ImgErrorInfo
{
public IntPtr description;
public Guid guid;
public uint helpContext;
public IntPtr helpFile;
public IntPtr source;
public IntPtr devDescription;
public Guid errorID;
public uint cUserParameters;
public IntPtr aUserParameters;
public IntPtr userFallback;
public uint exceptionID;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure ImgErrorInfo
Public description As IntPtr
Public guid As Guid
Public helpContext As UInteger
Public helpFile As IntPtr
Public source As IntPtr
Public devDescription As IntPtr
Public errorID As Guid
Public cUserParameters As UInteger
Public aUserParameters As IntPtr
Public userFallback As IntPtr
Public exceptionID As UInteger
End Structureimport ctypes
from ctypes import wintypes
class ImgErrorInfo(ctypes.Structure):
_fields_ = [
("description", ctypes.c_void_p),
("guid", GUID),
("helpContext", wintypes.DWORD),
("helpFile", ctypes.c_void_p),
("source", ctypes.c_void_p),
("devDescription", ctypes.c_void_p),
("errorID", GUID),
("cUserParameters", wintypes.DWORD),
("aUserParameters", ctypes.c_void_p),
("userFallback", ctypes.c_void_p),
("exceptionID", wintypes.DWORD),
]#[repr(C)]
pub struct ImgErrorInfo {
pub description: *mut core::ffi::c_void,
pub guid: GUID,
pub helpContext: u32,
pub helpFile: *mut core::ffi::c_void,
pub source: *mut core::ffi::c_void,
pub devDescription: *mut core::ffi::c_void,
pub errorID: GUID,
pub cUserParameters: u32,
pub aUserParameters: *mut core::ffi::c_void,
pub userFallback: *mut core::ffi::c_void,
pub exceptionID: u32,
}import "golang.org/x/sys/windows"
type ImgErrorInfo struct {
description uintptr
guid windows.GUID
helpContext uint32
helpFile uintptr
source uintptr
devDescription uintptr
errorID windows.GUID
cUserParameters uint32
aUserParameters uintptr
userFallback uintptr
exceptionID uint32
}type
ImgErrorInfo = record
description: Pointer;
guid: TGUID;
helpContext: DWORD;
helpFile: Pointer;
source: Pointer;
devDescription: Pointer;
errorID: TGUID;
cUserParameters: DWORD;
aUserParameters: Pointer;
userFallback: Pointer;
exceptionID: DWORD;
end;const ImgErrorInfo = extern struct {
description: ?*anyopaque,
guid: GUID,
helpContext: u32,
helpFile: ?*anyopaque,
source: ?*anyopaque,
devDescription: ?*anyopaque,
errorID: GUID,
cUserParameters: u32,
aUserParameters: ?*anyopaque,
userFallback: ?*anyopaque,
exceptionID: u32,
};type
ImgErrorInfo {.bycopy.} = object
description: pointer
guid: GUID
helpContext: uint32
helpFile: pointer
source: pointer
devDescription: pointer
errorID: GUID
cUserParameters: uint32
aUserParameters: pointer
userFallback: pointer
exceptionID: uint32struct ImgErrorInfo
{
void* description;
GUID guid;
uint helpContext;
void* helpFile;
void* source;
void* devDescription;
GUID errorID;
uint cUserParameters;
void* aUserParameters;
void* userFallback;
uint exceptionID;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; ImgErrorInfo サイズ: 68 バイト(x86)
dim st, 17 ; 4byte整数×17(構造体サイズ 68 / 4 切り上げ)
; description : LPWSTR (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; guid : GUID (+4, 16byte) varptr(st)+4 を基点に操作(16byte:入れ子/配列)
; helpContext : DWORD (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; helpFile : LPWSTR (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; source : LPWSTR (+28, 4byte) st.7 = 値 / 値 = st.7 (lpoke/lpeek も可)
; devDescription : LPWSTR (+32, 4byte) st.8 = 値 / 値 = st.8 (lpoke/lpeek も可)
; errorID : GUID (+36, 16byte) varptr(st)+36 を基点に操作(16byte:入れ子/配列)
; cUserParameters : DWORD (+52, 4byte) st.13 = 値 / 値 = st.13 (lpoke/lpeek も可)
; aUserParameters : LPWSTR* (+56, 4byte) st.14 = 値 / 値 = st.14 (lpoke/lpeek も可)
; userFallback : LPWSTR (+60, 4byte) st.15 = 値 / 値 = st.15 (lpoke/lpeek も可)
; exceptionID : DWORD (+64, 4byte) st.16 = 値 / 値 = st.16 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; ImgErrorInfo サイズ: 104 バイト(x64)
dim st, 26 ; 4byte整数×26(構造体サイズ 104 / 4 切り上げ)
; description : LPWSTR (+0, 8byte) qpoke st,0,値 / qpeek(st,0) ※IronHSPのみ。3.7/3.8は lpoke st,0,下位 : lpoke st,4,上位
; guid : GUID (+8, 16byte) varptr(st)+8 を基点に操作(16byte:入れ子/配列)
; helpContext : DWORD (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; helpFile : LPWSTR (+32, 8byte) qpoke st,32,値 / qpeek(st,32) ※IronHSPのみ。3.7/3.8は lpoke st,32,下位 : lpoke st,36,上位
; source : LPWSTR (+40, 8byte) qpoke st,40,値 / qpeek(st,40) ※IronHSPのみ。3.7/3.8は lpoke st,40,下位 : lpoke st,44,上位
; devDescription : LPWSTR (+48, 8byte) qpoke st,48,値 / qpeek(st,48) ※IronHSPのみ。3.7/3.8は lpoke st,48,下位 : lpoke st,52,上位
; errorID : GUID (+56, 16byte) varptr(st)+56 を基点に操作(16byte:入れ子/配列)
; cUserParameters : DWORD (+72, 4byte) st.18 = 値 / 値 = st.18 (lpoke/lpeek も可)
; aUserParameters : LPWSTR* (+80, 8byte) qpoke st,80,値 / qpeek(st,80) ※IronHSPのみ。3.7/3.8は lpoke st,80,下位 : lpoke st,84,上位
; userFallback : LPWSTR (+88, 8byte) qpoke st,88,値 / qpeek(st,88) ※IronHSPのみ。3.7/3.8は lpoke st,88,下位 : lpoke st,92,上位
; exceptionID : DWORD (+96, 4byte) st.24 = 値 / 値 = st.24 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
; ※GUID・入れ子構造体はデフォルト型でないため、依存する #defstruct を先に定義(下記に同梱)。
#defstruct global GUID, pack=1
#field int Data1
#field short Data2
#field short Data3
#field byte Data4 8
#endstruct
#defstruct global ImgErrorInfo
#field intptr description
#field GUID guid
#field int helpContext
#field intptr helpFile
#field intptr source
#field intptr devDescription
#field GUID errorID
#field int cUserParameters
#field intptr aUserParameters
#field intptr userFallback
#field int exceptionID
#endstruct
stdim st, ImgErrorInfo ; NSTRUCT 変数を確保
st->helpContext = 100
mes "helpContext=" + st->helpContext