Win32 API 日本語リファレンス
ホームDevices.WebServicesOnDevices › WSD_SOAP_FAULT

WSD_SOAP_FAULT

構造体
サイズx64: 40 バイト / x86: 20 バイト

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

フィールド

フィールドサイズx64x86説明
CodeWSD_SOAP_FAULT_CODE*8/4+0+0SOAP フォールト コードを格納する WSD_SOAP_FAULT_CODE 構造体です。
ReasonWSD_SOAP_FAULT_REASON*8/4+8+4フォールトに関する、ローカライズされた人間が読める説明を格納する WSD_SOAP_FAULT_REASON 構造体です。
NodeLPWSTR8/4+16+8SOAP メッセージ パス上で、フォールトの原因となった SOAP ノードです。
RoleLPWSTR8/4+24+12フォールトが発生した時点で Node が動作していた SOAP ロールです。
DetailWSDXML_ELEMENT*8/4+32+16フォールトに関連するアプリケーション固有のエラー情報を格納する WSDXML_ELEMENT 構造体です。

公式ドキュメント

生成された SOAP フォールトを表します。

出典・ライセンス: 上記「公式ドキュメント」の内容は Microsoft の Win32 API ドキュメント(MicrosoftDocs/sdk-api)を日本語に翻訳・改変したものです。© Microsoft Corporation. CC BY 4.0 で提供。
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)

各言語での定義

#include <windows.h>

// WSD_SOAP_FAULT  (x64 40 / x86 20 バイト)
typedef struct WSD_SOAP_FAULT {
    WSD_SOAP_FAULT_CODE* Code;
    WSD_SOAP_FAULT_REASON* Reason;
    LPWSTR Node;
    LPWSTR Role;
    WSDXML_ELEMENT* Detail;
} WSD_SOAP_FAULT;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct WSD_SOAP_FAULT
{
    public IntPtr Code;
    public IntPtr Reason;
    public IntPtr Node;
    public IntPtr Role;
    public IntPtr Detail;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure WSD_SOAP_FAULT
    Public Code As IntPtr
    Public Reason As IntPtr
    Public Node As IntPtr
    Public Role As IntPtr
    Public Detail As IntPtr
End Structure
import ctypes
from ctypes import wintypes

class WSD_SOAP_FAULT(ctypes.Structure):
    _fields_ = [
        ("Code", ctypes.c_void_p),
        ("Reason", ctypes.c_void_p),
        ("Node", ctypes.c_void_p),
        ("Role", ctypes.c_void_p),
        ("Detail", ctypes.c_void_p),
    ]
#[repr(C)]
pub struct WSD_SOAP_FAULT {
    pub Code: *mut core::ffi::c_void,
    pub Reason: *mut core::ffi::c_void,
    pub Node: *mut core::ffi::c_void,
    pub Role: *mut core::ffi::c_void,
    pub Detail: *mut core::ffi::c_void,
}
import "golang.org/x/sys/windows"

type WSD_SOAP_FAULT struct {
	Code uintptr
	Reason uintptr
	Node uintptr
	Role uintptr
	Detail uintptr
}
type
  WSD_SOAP_FAULT = record
    Code: Pointer;
    Reason: Pointer;
    Node: Pointer;
    Role: Pointer;
    Detail: Pointer;
  end;
const WSD_SOAP_FAULT = extern struct {
    Code: ?*anyopaque,
    Reason: ?*anyopaque,
    Node: ?*anyopaque,
    Role: ?*anyopaque,
    Detail: ?*anyopaque,
};
type
  WSD_SOAP_FAULT {.bycopy.} = object
    Code: pointer
    Reason: pointer
    Node: pointer
    Role: pointer
    Detail: pointer
struct WSD_SOAP_FAULT
{
    void* Code;
    void* Reason;
    void* Node;
    void* Role;
    void* Detail;
}

HSP用 定義

HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。

; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; WSD_SOAP_FAULT サイズ: 20 バイト(x86)
dim st, 5    ; 4byte整数×5(構造体サイズ 20 / 4 切り上げ)
; Code : WSD_SOAP_FAULT_CODE* (+0, 4byte)  varptr(st)+0 を基点に操作(4byte:入れ子/配列)
; Reason : WSD_SOAP_FAULT_REASON* (+4, 4byte)  varptr(st)+4 を基点に操作(4byte:入れ子/配列)
; Node : LPWSTR (+8, 4byte)  st.2 = 値  /  値 = st.2   (lpoke/lpeek も可)
; Role : LPWSTR (+12, 4byte)  st.3 = 値  /  値 = st.3   (lpoke/lpeek も可)
; Detail : WSDXML_ELEMENT* (+16, 4byte)  varptr(st)+16 を基点に操作(4byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; WSD_SOAP_FAULT サイズ: 40 バイト(x64)
dim st, 10    ; 4byte整数×10(構造体サイズ 40 / 4 切り上げ)
; Code : WSD_SOAP_FAULT_CODE* (+0, 8byte)  varptr(st)+0 を基点に操作(8byte:入れ子/配列)
; Reason : WSD_SOAP_FAULT_REASON* (+8, 8byte)  varptr(st)+8 を基点に操作(8byte:入れ子/配列)
; Node : LPWSTR (+16, 8byte)  qpoke st,16,値 / qpeek(st,16)  ※IronHSPのみ。3.7/3.8は lpoke st,16,下位 : lpoke st,20,上位
; Role : LPWSTR (+24, 8byte)  qpoke st,24,値 / qpeek(st,24)  ※IronHSPのみ。3.7/3.8は lpoke st,24,下位 : lpoke st,28,上位
; Detail : WSDXML_ELEMENT* (+32, 8byte)  varptr(st)+32 を基点に操作(8byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global WSD_SOAP_FAULT
    #field intptr Code
    #field intptr Reason
    #field intptr Node
    #field intptr Role
    #field intptr Detail
#endstruct

stdim st, WSD_SOAP_FAULT        ; NSTRUCT 変数を確保