ホーム › Devices.WebServicesOnDevices › WSDXMLCreateContext
WSDXMLCreateContext
関数WSDのXMLコンテキストオブジェクトを作成する。
シグネチャ
// wsdapi.dll
#include <windows.h>
HRESULT WSDXMLCreateContext(
IWSDXMLContext** ppContext
);パラメーター
| 名前 | 型 | 方向 | 説明 |
|---|---|---|---|
| ppContext | IWSDXMLContext** | out | 作成したIWSDXMLContextオブジェクトを受け取る出力先ポインタ。 |
戻り値の型: HRESULT
各言語での呼び出し定義
// wsdapi.dll
#include <windows.h>
HRESULT WSDXMLCreateContext(
IWSDXMLContext** ppContext
);[DllImport("wsdapi.dll", ExactSpelling = true)]
static extern int WSDXMLCreateContext(
IntPtr ppContext // IWSDXMLContext** out
);<DllImport("wsdapi.dll", ExactSpelling:=True)>
Public Shared Function WSDXMLCreateContext(
ppContext As IntPtr ' IWSDXMLContext** out
) As Integer
End Function' ppContext : IWSDXMLContext** out
Declare PtrSafe Function WSDXMLCreateContext Lib "wsdapi" ( _
ByVal ppContext As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
WSDXMLCreateContext = ctypes.windll.wsdapi.WSDXMLCreateContext
WSDXMLCreateContext.restype = ctypes.c_int
WSDXMLCreateContext.argtypes = [
ctypes.c_void_p, # ppContext : IWSDXMLContext** out
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('wsdapi.dll')
WSDXMLCreateContext = Fiddle::Function.new(
lib['WSDXMLCreateContext'],
[
Fiddle::TYPE_VOIDP, # ppContext : IWSDXMLContext** out
],
Fiddle::TYPE_INT)#[link(name = "wsdapi")]
extern "system" {
fn WSDXMLCreateContext(
ppContext: *mut *mut core::ffi::c_void // IWSDXMLContext** out
) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("wsdapi.dll")]
public static extern int WSDXMLCreateContext(IntPtr ppContext);
"@
$api = Add-Type -MemberDefinition $sig -Name 'wsdapi_WSDXMLCreateContext' -Namespace Win32 -PassThru
# $api::WSDXMLCreateContext(ppContext)#uselib "wsdapi.dll"
#func global WSDXMLCreateContext "WSDXMLCreateContext" sptr
; WSDXMLCreateContext ppContext ; 戻り値は stat
; ppContext : IWSDXMLContext** out -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "wsdapi.dll"
#cfunc global WSDXMLCreateContext "WSDXMLCreateContext" sptr
; res = WSDXMLCreateContext(ppContext)
; ppContext : IWSDXMLContext** out -> "sptr"; HRESULT WSDXMLCreateContext(IWSDXMLContext** ppContext)
#uselib "wsdapi.dll"
#cfunc global WSDXMLCreateContext "WSDXMLCreateContext" intptr
; res = WSDXMLCreateContext(ppContext)
; ppContext : IWSDXMLContext** out -> "intptr"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
wsdapi = windows.NewLazySystemDLL("wsdapi.dll")
procWSDXMLCreateContext = wsdapi.NewProc("WSDXMLCreateContext")
)
// ppContext (IWSDXMLContext** out)
r1, _, err := procWSDXMLCreateContext.Call(
uintptr(ppContext),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // HRESULTfunction WSDXMLCreateContext(
ppContext: Pointer // IWSDXMLContext** out
): Integer; stdcall;
external 'wsdapi.dll' name 'WSDXMLCreateContext';result := DllCall("wsdapi\WSDXMLCreateContext"
, "Ptr", ppContext ; IWSDXMLContext** out
, "Int") ; return: HRESULT●WSDXMLCreateContext(ppContext) = DLL("wsdapi.dll", "int WSDXMLCreateContext(void*)")
# 呼び出し: WSDXMLCreateContext(ppContext)
# ppContext : IWSDXMLContext** out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。