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