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