ホーム › Networking.WindowsWebServices › WsAbandonCall
WsAbandonCall
関数サービスプロキシの指定した呼び出しを放棄する。
シグネチャ
// webservices.dll
#include <windows.h>
HRESULT WsAbandonCall(
WS_SERVICE_PROXY* serviceProxy,
DWORD callId,
WS_ERROR* error // optional
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| serviceProxy | WS_SERVICE_PROXY* | in |
| callId | DWORD | in |
| error | WS_ERROR* | inoptional |
戻り値の型: HRESULT
各言語での呼び出し定義
// webservices.dll
#include <windows.h>
HRESULT WsAbandonCall(
WS_SERVICE_PROXY* serviceProxy,
DWORD callId,
WS_ERROR* error // optional
);[DllImport("webservices.dll", ExactSpelling = true)]
static extern int WsAbandonCall(
ref IntPtr serviceProxy, // WS_SERVICE_PROXY*
uint callId, // DWORD
IntPtr error // WS_ERROR* optional
);<DllImport("webservices.dll", ExactSpelling:=True)>
Public Shared Function WsAbandonCall(
ByRef serviceProxy As IntPtr, ' WS_SERVICE_PROXY*
callId As UInteger, ' DWORD
[error] As IntPtr ' WS_ERROR* optional
) As Integer
End Function' serviceProxy : WS_SERVICE_PROXY*
' callId : DWORD
' error : WS_ERROR* optional
Declare PtrSafe Function WsAbandonCall Lib "webservices" ( _
ByRef serviceProxy As LongPtr, _
ByVal callId As Long, _
ByVal error As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
WsAbandonCall = ctypes.windll.webservices.WsAbandonCall
WsAbandonCall.restype = ctypes.c_int
WsAbandonCall.argtypes = [
ctypes.c_void_p, # serviceProxy : WS_SERVICE_PROXY*
wintypes.DWORD, # callId : DWORD
ctypes.c_void_p, # error : WS_ERROR* optional
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('webservices.dll')
WsAbandonCall = Fiddle::Function.new(
lib['WsAbandonCall'],
[
Fiddle::TYPE_VOIDP, # serviceProxy : WS_SERVICE_PROXY*
-Fiddle::TYPE_INT, # callId : DWORD
Fiddle::TYPE_VOIDP, # error : WS_ERROR* optional
],
Fiddle::TYPE_INT)#[link(name = "webservices")]
extern "system" {
fn WsAbandonCall(
serviceProxy: *mut isize, // WS_SERVICE_PROXY*
callId: u32, // DWORD
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 WsAbandonCall(ref IntPtr serviceProxy, uint callId, IntPtr error);
"@
$api = Add-Type -MemberDefinition $sig -Name 'webservices_WsAbandonCall' -Namespace Win32 -PassThru
# $api::WsAbandonCall(serviceProxy, callId, error)#uselib "webservices.dll"
#func global WsAbandonCall "WsAbandonCall" sptr, sptr, sptr
; WsAbandonCall serviceProxy, callId, error ; 戻り値は stat
; serviceProxy : WS_SERVICE_PROXY* -> "sptr"
; callId : DWORD -> "sptr"
; error : WS_ERROR* optional -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "webservices.dll"
#cfunc global WsAbandonCall "WsAbandonCall" int, int, int
; res = WsAbandonCall(serviceProxy, callId, error)
; serviceProxy : WS_SERVICE_PROXY* -> "int"
; callId : DWORD -> "int"
; error : WS_ERROR* optional -> "int"; HRESULT WsAbandonCall(WS_SERVICE_PROXY* serviceProxy, DWORD callId, WS_ERROR* error)
#uselib "webservices.dll"
#cfunc global WsAbandonCall "WsAbandonCall" int, int, int
; res = WsAbandonCall(serviceProxy, callId, error)
; serviceProxy : WS_SERVICE_PROXY* -> "int"
; callId : DWORD -> "int"
; error : WS_ERROR* optional -> "int"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
webservices = windows.NewLazySystemDLL("webservices.dll")
procWsAbandonCall = webservices.NewProc("WsAbandonCall")
)
// serviceProxy (WS_SERVICE_PROXY*), callId (DWORD), error (WS_ERROR* optional)
r1, _, err := procWsAbandonCall.Call(
uintptr(serviceProxy),
uintptr(callId),
uintptr(error),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // HRESULTfunction WsAbandonCall(
serviceProxy: Pointer; // WS_SERVICE_PROXY*
callId: DWORD; // DWORD
error: Pointer // WS_ERROR* optional
): Integer; stdcall;
external 'webservices.dll' name 'WsAbandonCall';result := DllCall("webservices\WsAbandonCall"
, "Ptr", serviceProxy ; WS_SERVICE_PROXY*
, "UInt", callId ; DWORD
, "Ptr", error ; WS_ERROR* optional
, "Int") ; return: HRESULT●WsAbandonCall(serviceProxy, callId, error) = DLL("webservices.dll", "int WsAbandonCall(void*, dword, void*)")
# 呼び出し: WsAbandonCall(serviceProxy, callId, error)
# serviceProxy : WS_SERVICE_PROXY* -> "void*"
# callId : DWORD -> "dword"
# error : WS_ERROR* optional -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。