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