Win32 API 日本語リファレンス
ホームSystem.Rpc › I_RpcGetCurrentCallHandle

I_RpcGetCurrentCallHandle

関数
現在のRPC呼び出しのハンドルを取得する内部関数。
DLLRPCRT4.dll呼出規約winapi

シグネチャ

// RPCRT4.dll
#include <windows.h>

void* I_RpcGetCurrentCallHandle(void);

パラメーターなし。戻り値: void*

各言語での呼び出し定義

// RPCRT4.dll
#include <windows.h>

void* I_RpcGetCurrentCallHandle(void);
[DllImport("RPCRT4.dll", ExactSpelling = true)]
static extern IntPtr I_RpcGetCurrentCallHandle();
<DllImport("RPCRT4.dll", ExactSpelling:=True)>
Public Shared Function I_RpcGetCurrentCallHandle() As IntPtr
End Function
Declare PtrSafe Function I_RpcGetCurrentCallHandle Lib "rpcrt4" () As LongPtr
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

I_RpcGetCurrentCallHandle = ctypes.windll.rpcrt4.I_RpcGetCurrentCallHandle
I_RpcGetCurrentCallHandle.restype = ctypes.c_void_p
I_RpcGetCurrentCallHandle.argtypes = []
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('RPCRT4.dll')
I_RpcGetCurrentCallHandle = Fiddle::Function.new(
  lib['I_RpcGetCurrentCallHandle'],
  [],
  Fiddle::TYPE_VOIDP)
#[link(name = "rpcrt4")]
extern "system" {
    fn I_RpcGetCurrentCallHandle() -> *mut ();
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("RPCRT4.dll")]
public static extern IntPtr I_RpcGetCurrentCallHandle();
"@
$api = Add-Type -MemberDefinition $sig -Name 'RPCRT4_I_RpcGetCurrentCallHandle' -Namespace Win32 -PassThru
# $api::I_RpcGetCurrentCallHandle()
#uselib "RPCRT4.dll"
#func global I_RpcGetCurrentCallHandle "I_RpcGetCurrentCallHandle"
; I_RpcGetCurrentCallHandle   ; 戻り値は stat
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
#uselib "RPCRT4.dll"
#cfunc global I_RpcGetCurrentCallHandle "I_RpcGetCurrentCallHandle"
; res = I_RpcGetCurrentCallHandle()
; void* I_RpcGetCurrentCallHandle()
#uselib "RPCRT4.dll"
#cfunc global I_RpcGetCurrentCallHandle "I_RpcGetCurrentCallHandle"
; res = I_RpcGetCurrentCallHandle()
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	rpcrt4 = windows.NewLazySystemDLL("RPCRT4.dll")
	procI_RpcGetCurrentCallHandle = rpcrt4.NewProc("I_RpcGetCurrentCallHandle")
)

r1, _, err := procI_RpcGetCurrentCallHandle.Call()
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // void*
function I_RpcGetCurrentCallHandle: Pointer; stdcall;
  external 'RPCRT4.dll' name 'I_RpcGetCurrentCallHandle';
result := DllCall("RPCRT4\I_RpcGetCurrentCallHandle", "Ptr")
●I_RpcGetCurrentCallHandle() = DLL("RPCRT4.dll", "void* I_RpcGetCurrentCallHandle()")
# 呼び出し: I_RpcGetCurrentCallHandle()
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。