Win32 API 日本語リファレンス
ホームNetworking.WindowsWebServices › WsReadEnvelopeStart

WsReadEnvelopeStart

関数
メッセージのSOAPエンベロープの読み取りを開始する。
DLLwebservices.dll呼出規約winapi対応OSWindows 7 以降

シグネチャ

// webservices.dll
#include <windows.h>

HRESULT WsReadEnvelopeStart(
    WS_MESSAGE* message,
    WS_XML_READER* reader,
    WS_MESSAGE_DONE_CALLBACK doneCallback,   // optional
    void* doneCallbackState,   // optional
    WS_ERROR* error   // optional
);

パラメーター

名前方向
messageWS_MESSAGE*in
readerWS_XML_READER*in
doneCallbackWS_MESSAGE_DONE_CALLBACKinoptional
doneCallbackStatevoid*inoptional
errorWS_ERROR*inoptional

戻り値の型: HRESULT

各言語での呼び出し定義

// webservices.dll
#include <windows.h>

HRESULT WsReadEnvelopeStart(
    WS_MESSAGE* message,
    WS_XML_READER* reader,
    WS_MESSAGE_DONE_CALLBACK doneCallback,   // optional
    void* doneCallbackState,   // optional
    WS_ERROR* error   // optional
);
[DllImport("webservices.dll", ExactSpelling = true)]
static extern int WsReadEnvelopeStart(
    ref IntPtr message,   // WS_MESSAGE*
    ref IntPtr reader,   // WS_XML_READER*
    IntPtr doneCallback,   // WS_MESSAGE_DONE_CALLBACK optional
    IntPtr doneCallbackState,   // void* optional
    IntPtr error   // WS_ERROR* optional
);
<DllImport("webservices.dll", ExactSpelling:=True)>
Public Shared Function WsReadEnvelopeStart(
    ByRef message As IntPtr,   ' WS_MESSAGE*
    ByRef reader As IntPtr,   ' WS_XML_READER*
    doneCallback As IntPtr,   ' WS_MESSAGE_DONE_CALLBACK optional
    doneCallbackState As IntPtr,   ' void* optional
    [error] As IntPtr   ' WS_ERROR* optional
) As Integer
End Function
' message : WS_MESSAGE*
' reader : WS_XML_READER*
' doneCallback : WS_MESSAGE_DONE_CALLBACK optional
' doneCallbackState : void* optional
' error : WS_ERROR* optional
Declare PtrSafe Function WsReadEnvelopeStart Lib "webservices" ( _
    ByRef message As LongPtr, _
    ByRef reader As LongPtr, _
    ByVal doneCallback As LongPtr, _
    ByVal doneCallbackState As LongPtr, _
    ByVal error As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

WsReadEnvelopeStart = ctypes.windll.webservices.WsReadEnvelopeStart
WsReadEnvelopeStart.restype = ctypes.c_int
WsReadEnvelopeStart.argtypes = [
    ctypes.c_void_p,  # message : WS_MESSAGE*
    ctypes.c_void_p,  # reader : WS_XML_READER*
    ctypes.c_void_p,  # doneCallback : WS_MESSAGE_DONE_CALLBACK optional
    ctypes.POINTER(None),  # doneCallbackState : void* optional
    ctypes.c_void_p,  # error : WS_ERROR* optional
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('webservices.dll')
WsReadEnvelopeStart = Fiddle::Function.new(
  lib['WsReadEnvelopeStart'],
  [
    Fiddle::TYPE_VOIDP,  # message : WS_MESSAGE*
    Fiddle::TYPE_VOIDP,  # reader : WS_XML_READER*
    Fiddle::TYPE_VOIDP,  # doneCallback : WS_MESSAGE_DONE_CALLBACK optional
    Fiddle::TYPE_VOIDP,  # doneCallbackState : void* optional
    Fiddle::TYPE_VOIDP,  # error : WS_ERROR* optional
  ],
  Fiddle::TYPE_INT)
#[link(name = "webservices")]
extern "system" {
    fn WsReadEnvelopeStart(
        message: *mut isize,  // WS_MESSAGE*
        reader: *mut isize,  // WS_XML_READER*
        doneCallback: *const core::ffi::c_void,  // WS_MESSAGE_DONE_CALLBACK optional
        doneCallbackState: *mut (),  // void* optional
        error: *mut isize  // WS_ERROR* optional
    ) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("webservices.dll")]
public static extern int WsReadEnvelopeStart(ref IntPtr message, ref IntPtr reader, IntPtr doneCallback, IntPtr doneCallbackState, IntPtr error);
"@
$api = Add-Type -MemberDefinition $sig -Name 'webservices_WsReadEnvelopeStart' -Namespace Win32 -PassThru
# $api::WsReadEnvelopeStart(message, reader, doneCallback, doneCallbackState, error)
#uselib "webservices.dll"
#func global WsReadEnvelopeStart "WsReadEnvelopeStart" sptr, sptr, sptr, sptr, sptr
; WsReadEnvelopeStart message, reader, doneCallback, doneCallbackState, error   ; 戻り値は stat
; message : WS_MESSAGE* -> "sptr"
; reader : WS_XML_READER* -> "sptr"
; doneCallback : WS_MESSAGE_DONE_CALLBACK optional -> "sptr"
; doneCallbackState : void* optional -> "sptr"
; error : WS_ERROR* optional -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
#uselib "webservices.dll"
#cfunc global WsReadEnvelopeStart "WsReadEnvelopeStart" int, int, sptr, sptr, int
; res = WsReadEnvelopeStart(message, reader, doneCallback, doneCallbackState, error)
; message : WS_MESSAGE* -> "int"
; reader : WS_XML_READER* -> "int"
; doneCallback : WS_MESSAGE_DONE_CALLBACK optional -> "sptr"
; doneCallbackState : void* optional -> "sptr"
; error : WS_ERROR* optional -> "int"
; HRESULT WsReadEnvelopeStart(WS_MESSAGE* message, WS_XML_READER* reader, WS_MESSAGE_DONE_CALLBACK doneCallback, void* doneCallbackState, WS_ERROR* error)
#uselib "webservices.dll"
#cfunc global WsReadEnvelopeStart "WsReadEnvelopeStart" int, int, intptr, intptr, int
; res = WsReadEnvelopeStart(message, reader, doneCallback, doneCallbackState, error)
; message : WS_MESSAGE* -> "int"
; reader : WS_XML_READER* -> "int"
; doneCallback : WS_MESSAGE_DONE_CALLBACK optional -> "intptr"
; doneCallbackState : void* optional -> "intptr"
; error : WS_ERROR* optional -> "int"
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	webservices = windows.NewLazySystemDLL("webservices.dll")
	procWsReadEnvelopeStart = webservices.NewProc("WsReadEnvelopeStart")
)

// message (WS_MESSAGE*), reader (WS_XML_READER*), doneCallback (WS_MESSAGE_DONE_CALLBACK optional), doneCallbackState (void* optional), error (WS_ERROR* optional)
r1, _, err := procWsReadEnvelopeStart.Call(
	uintptr(message),
	uintptr(reader),
	uintptr(doneCallback),
	uintptr(doneCallbackState),
	uintptr(error),
)
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // HRESULT
function WsReadEnvelopeStart(
  message: Pointer;   // WS_MESSAGE*
  reader: Pointer;   // WS_XML_READER*
  doneCallback: Pointer;   // WS_MESSAGE_DONE_CALLBACK optional
  doneCallbackState: Pointer;   // void* optional
  error: Pointer   // WS_ERROR* optional
): Integer; stdcall;
  external 'webservices.dll' name 'WsReadEnvelopeStart';
result := DllCall("webservices\WsReadEnvelopeStart"
    , "Ptr", message   ; WS_MESSAGE*
    , "Ptr", reader   ; WS_XML_READER*
    , "Ptr", doneCallback   ; WS_MESSAGE_DONE_CALLBACK optional
    , "Ptr", doneCallbackState   ; void* optional
    , "Ptr", error   ; WS_ERROR* optional
    , "Int")   ; return: HRESULT
●WsReadEnvelopeStart(message, reader, doneCallback, doneCallbackState, error) = DLL("webservices.dll", "int WsReadEnvelopeStart(void*, void*, void*, void*, void*)")
# 呼び出し: WsReadEnvelopeStart(message, reader, doneCallback, doneCallbackState, error)
# message : WS_MESSAGE* -> "void*"
# reader : WS_XML_READER* -> "void*"
# doneCallback : WS_MESSAGE_DONE_CALLBACK optional -> "void*"
# doneCallbackState : void* optional -> "void*"
# error : WS_ERROR* optional -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。