ホーム › Networking.WindowsWebServices › WsWriteEnvelopeStart
WsWriteEnvelopeStart
関数メッセージのエンベロープ開始部を書き込む。
シグネチャ
// webservices.dll
#include <windows.h>
HRESULT WsWriteEnvelopeStart(
WS_MESSAGE* message,
WS_XML_WRITER* writer,
WS_MESSAGE_DONE_CALLBACK doneCallback, // optional
void* doneCallbackState, // optional
WS_ERROR* error // optional
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| message | WS_MESSAGE* | in |
| writer | WS_XML_WRITER* | in |
| doneCallback | WS_MESSAGE_DONE_CALLBACK | inoptional |
| doneCallbackState | void* | inoptional |
| error | WS_ERROR* | inoptional |
戻り値の型: HRESULT
各言語での呼び出し定義
// webservices.dll
#include <windows.h>
HRESULT WsWriteEnvelopeStart(
WS_MESSAGE* message,
WS_XML_WRITER* writer,
WS_MESSAGE_DONE_CALLBACK doneCallback, // optional
void* doneCallbackState, // optional
WS_ERROR* error // optional
);[DllImport("webservices.dll", ExactSpelling = true)]
static extern int WsWriteEnvelopeStart(
ref IntPtr message, // WS_MESSAGE*
ref IntPtr writer, // WS_XML_WRITER*
IntPtr doneCallback, // WS_MESSAGE_DONE_CALLBACK optional
IntPtr doneCallbackState, // void* optional
IntPtr error // WS_ERROR* optional
);<DllImport("webservices.dll", ExactSpelling:=True)>
Public Shared Function WsWriteEnvelopeStart(
ByRef message As IntPtr, ' WS_MESSAGE*
ByRef writer As IntPtr, ' WS_XML_WRITER*
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*
' writer : WS_XML_WRITER*
' doneCallback : WS_MESSAGE_DONE_CALLBACK optional
' doneCallbackState : void* optional
' error : WS_ERROR* optional
Declare PtrSafe Function WsWriteEnvelopeStart Lib "webservices" ( _
ByRef message As LongPtr, _
ByRef writer 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
WsWriteEnvelopeStart = ctypes.windll.webservices.WsWriteEnvelopeStart
WsWriteEnvelopeStart.restype = ctypes.c_int
WsWriteEnvelopeStart.argtypes = [
ctypes.c_void_p, # message : WS_MESSAGE*
ctypes.c_void_p, # writer : WS_XML_WRITER*
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')
WsWriteEnvelopeStart = Fiddle::Function.new(
lib['WsWriteEnvelopeStart'],
[
Fiddle::TYPE_VOIDP, # message : WS_MESSAGE*
Fiddle::TYPE_VOIDP, # writer : WS_XML_WRITER*
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 WsWriteEnvelopeStart(
message: *mut isize, // WS_MESSAGE*
writer: *mut isize, // WS_XML_WRITER*
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 WsWriteEnvelopeStart(ref IntPtr message, ref IntPtr writer, IntPtr doneCallback, IntPtr doneCallbackState, IntPtr error);
"@
$api = Add-Type -MemberDefinition $sig -Name 'webservices_WsWriteEnvelopeStart' -Namespace Win32 -PassThru
# $api::WsWriteEnvelopeStart(message, writer, doneCallback, doneCallbackState, error)#uselib "webservices.dll"
#func global WsWriteEnvelopeStart "WsWriteEnvelopeStart" sptr, sptr, sptr, sptr, sptr
; WsWriteEnvelopeStart message, writer, doneCallback, doneCallbackState, error ; 戻り値は stat
; message : WS_MESSAGE* -> "sptr"
; writer : WS_XML_WRITER* -> "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 WsWriteEnvelopeStart "WsWriteEnvelopeStart" int, int, sptr, sptr, int
; res = WsWriteEnvelopeStart(message, writer, doneCallback, doneCallbackState, error)
; message : WS_MESSAGE* -> "int"
; writer : WS_XML_WRITER* -> "int"
; doneCallback : WS_MESSAGE_DONE_CALLBACK optional -> "sptr"
; doneCallbackState : void* optional -> "sptr"
; error : WS_ERROR* optional -> "int"; HRESULT WsWriteEnvelopeStart(WS_MESSAGE* message, WS_XML_WRITER* writer, WS_MESSAGE_DONE_CALLBACK doneCallback, void* doneCallbackState, WS_ERROR* error)
#uselib "webservices.dll"
#cfunc global WsWriteEnvelopeStart "WsWriteEnvelopeStart" int, int, intptr, intptr, int
; res = WsWriteEnvelopeStart(message, writer, doneCallback, doneCallbackState, error)
; message : WS_MESSAGE* -> "int"
; writer : WS_XML_WRITER* -> "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")
procWsWriteEnvelopeStart = webservices.NewProc("WsWriteEnvelopeStart")
)
// message (WS_MESSAGE*), writer (WS_XML_WRITER*), doneCallback (WS_MESSAGE_DONE_CALLBACK optional), doneCallbackState (void* optional), error (WS_ERROR* optional)
r1, _, err := procWsWriteEnvelopeStart.Call(
uintptr(message),
uintptr(writer),
uintptr(doneCallback),
uintptr(doneCallbackState),
uintptr(error),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // HRESULTfunction WsWriteEnvelopeStart(
message: Pointer; // WS_MESSAGE*
writer: Pointer; // WS_XML_WRITER*
doneCallback: Pointer; // WS_MESSAGE_DONE_CALLBACK optional
doneCallbackState: Pointer; // void* optional
error: Pointer // WS_ERROR* optional
): Integer; stdcall;
external 'webservices.dll' name 'WsWriteEnvelopeStart';result := DllCall("webservices\WsWriteEnvelopeStart"
, "Ptr", message ; WS_MESSAGE*
, "Ptr", writer ; WS_XML_WRITER*
, "Ptr", doneCallback ; WS_MESSAGE_DONE_CALLBACK optional
, "Ptr", doneCallbackState ; void* optional
, "Ptr", error ; WS_ERROR* optional
, "Int") ; return: HRESULT●WsWriteEnvelopeStart(message, writer, doneCallback, doneCallbackState, error) = DLL("webservices.dll", "int WsWriteEnvelopeStart(void*, void*, void*, void*, void*)")
# 呼び出し: WsWriteEnvelopeStart(message, writer, doneCallback, doneCallbackState, error)
# message : WS_MESSAGE* -> "void*"
# writer : WS_XML_WRITER* -> "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)。