ホーム › Devices.WebServicesOnDevices › WSDXMLCleanupElement
WSDXMLCleanupElement
関数WSDXML要素ツリーを解放してクリーンアップする。
シグネチャ
// wsdapi.dll
#include <windows.h>
HRESULT WSDXMLCleanupElement(
WSDXML_ELEMENT* pAny
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| pAny | WSDXML_ELEMENT* | inout |
戻り値の型: HRESULT
各言語での呼び出し定義
// wsdapi.dll
#include <windows.h>
HRESULT WSDXMLCleanupElement(
WSDXML_ELEMENT* pAny
);[DllImport("wsdapi.dll", ExactSpelling = true)]
static extern int WSDXMLCleanupElement(
IntPtr pAny // WSDXML_ELEMENT* in/out
);<DllImport("wsdapi.dll", ExactSpelling:=True)>
Public Shared Function WSDXMLCleanupElement(
pAny As IntPtr ' WSDXML_ELEMENT* in/out
) As Integer
End Function' pAny : WSDXML_ELEMENT* in/out
Declare PtrSafe Function WSDXMLCleanupElement Lib "wsdapi" ( _
ByVal pAny As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
WSDXMLCleanupElement = ctypes.windll.wsdapi.WSDXMLCleanupElement
WSDXMLCleanupElement.restype = ctypes.c_int
WSDXMLCleanupElement.argtypes = [
ctypes.c_void_p, # pAny : WSDXML_ELEMENT* in/out
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('wsdapi.dll')
WSDXMLCleanupElement = Fiddle::Function.new(
lib['WSDXMLCleanupElement'],
[
Fiddle::TYPE_VOIDP, # pAny : WSDXML_ELEMENT* in/out
],
Fiddle::TYPE_INT)#[link(name = "wsdapi")]
extern "system" {
fn WSDXMLCleanupElement(
pAny: *mut WSDXML_ELEMENT // WSDXML_ELEMENT* in/out
) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("wsdapi.dll")]
public static extern int WSDXMLCleanupElement(IntPtr pAny);
"@
$api = Add-Type -MemberDefinition $sig -Name 'wsdapi_WSDXMLCleanupElement' -Namespace Win32 -PassThru
# $api::WSDXMLCleanupElement(pAny)#uselib "wsdapi.dll"
#func global WSDXMLCleanupElement "WSDXMLCleanupElement" sptr
; WSDXMLCleanupElement varptr(pAny) ; 戻り値は stat
; pAny : WSDXML_ELEMENT* in/out -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。出力引数:
#uselib "wsdapi.dll" #cfunc global WSDXMLCleanupElement "WSDXMLCleanupElement" var ; res = WSDXMLCleanupElement(pAny) ; pAny : WSDXML_ELEMENT* in/out -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。#uselib "wsdapi.dll" #cfunc global WSDXMLCleanupElement "WSDXMLCleanupElement" sptr ; res = WSDXMLCleanupElement(varptr(pAny)) ; pAny : WSDXML_ELEMENT* in/out -> "sptr" ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。
出力引数:
; HRESULT WSDXMLCleanupElement(WSDXML_ELEMENT* pAny) #uselib "wsdapi.dll" #cfunc global WSDXMLCleanupElement "WSDXMLCleanupElement" var ; res = WSDXMLCleanupElement(pAny) ; pAny : WSDXML_ELEMENT* in/out -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。; HRESULT WSDXMLCleanupElement(WSDXML_ELEMENT* pAny) #uselib "wsdapi.dll" #cfunc global WSDXMLCleanupElement "WSDXMLCleanupElement" intptr ; res = WSDXMLCleanupElement(varptr(pAny)) ; pAny : WSDXML_ELEMENT* in/out -> "intptr" ; ※出力/バッファ引数はポインタ方式(token=intptr / 呼び出しは varptr(変数))。
import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
wsdapi = windows.NewLazySystemDLL("wsdapi.dll")
procWSDXMLCleanupElement = wsdapi.NewProc("WSDXMLCleanupElement")
)
// pAny (WSDXML_ELEMENT* in/out)
r1, _, err := procWSDXMLCleanupElement.Call(
uintptr(pAny),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // HRESULTfunction WSDXMLCleanupElement(
pAny: Pointer // WSDXML_ELEMENT* in/out
): Integer; stdcall;
external 'wsdapi.dll' name 'WSDXMLCleanupElement';result := DllCall("wsdapi\WSDXMLCleanupElement"
, "Ptr", pAny ; WSDXML_ELEMENT* in/out
, "Int") ; return: HRESULT●WSDXMLCleanupElement(pAny) = DLL("wsdapi.dll", "int WSDXMLCleanupElement(void*)")
# 呼び出し: WSDXMLCleanupElement(pAny)
# pAny : WSDXML_ELEMENT* in/out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。