ホーム › System.Rpc › NdrServerCallAll
NdrServerCallAll
関数全NDR形式に対応したRPCサーバー呼び出しを処理する。
シグネチャ
// RPCRT4.dll
#include <windows.h>
void NdrServerCallAll(
RPC_MESSAGE* pRpcMsg
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| pRpcMsg | RPC_MESSAGE* | inout |
戻り値の型: void
各言語での呼び出し定義
// RPCRT4.dll
#include <windows.h>
void NdrServerCallAll(
RPC_MESSAGE* pRpcMsg
);[DllImport("RPCRT4.dll", ExactSpelling = true)]
static extern void NdrServerCallAll(
IntPtr pRpcMsg // RPC_MESSAGE* in/out
);<DllImport("RPCRT4.dll", ExactSpelling:=True)>
Public Shared Sub NdrServerCallAll(
pRpcMsg As IntPtr ' RPC_MESSAGE* in/out
)
End Sub' pRpcMsg : RPC_MESSAGE* in/out
Declare PtrSafe Sub NdrServerCallAll Lib "rpcrt4" ( _
ByVal pRpcMsg As LongPtr)
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
NdrServerCallAll = ctypes.windll.rpcrt4.NdrServerCallAll
NdrServerCallAll.restype = None
NdrServerCallAll.argtypes = [
ctypes.c_void_p, # pRpcMsg : RPC_MESSAGE* in/out
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('RPCRT4.dll')
NdrServerCallAll = Fiddle::Function.new(
lib['NdrServerCallAll'],
[
Fiddle::TYPE_VOIDP, # pRpcMsg : RPC_MESSAGE* in/out
],
Fiddle::TYPE_VOID)#[link(name = "rpcrt4")]
extern "system" {
fn NdrServerCallAll(
pRpcMsg: *mut RPC_MESSAGE // RPC_MESSAGE* in/out
);
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("RPCRT4.dll")]
public static extern void NdrServerCallAll(IntPtr pRpcMsg);
"@
$api = Add-Type -MemberDefinition $sig -Name 'RPCRT4_NdrServerCallAll' -Namespace Win32 -PassThru
# $api::NdrServerCallAll(pRpcMsg)#uselib "RPCRT4.dll"
#func global NdrServerCallAll "NdrServerCallAll" sptr
; NdrServerCallAll varptr(pRpcMsg)
; pRpcMsg : RPC_MESSAGE* in/out -> "sptr"出力引数:
#uselib "RPCRT4.dll" #func global NdrServerCallAll "NdrServerCallAll" var ; NdrServerCallAll pRpcMsg ; pRpcMsg : RPC_MESSAGE* in/out -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。#uselib "RPCRT4.dll" #func global NdrServerCallAll "NdrServerCallAll" sptr ; NdrServerCallAll varptr(pRpcMsg) ; pRpcMsg : RPC_MESSAGE* in/out -> "sptr" ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。
出力引数:
; void NdrServerCallAll(RPC_MESSAGE* pRpcMsg) #uselib "RPCRT4.dll" #func global NdrServerCallAll "NdrServerCallAll" var ; NdrServerCallAll pRpcMsg ; pRpcMsg : RPC_MESSAGE* in/out -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。; void NdrServerCallAll(RPC_MESSAGE* pRpcMsg) #uselib "RPCRT4.dll" #func global NdrServerCallAll "NdrServerCallAll" intptr ; NdrServerCallAll varptr(pRpcMsg) ; pRpcMsg : RPC_MESSAGE* in/out -> "intptr" ; ※出力/バッファ引数はポインタ方式(token=intptr / 呼び出しは varptr(変数))。
import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
rpcrt4 = windows.NewLazySystemDLL("RPCRT4.dll")
procNdrServerCallAll = rpcrt4.NewProc("NdrServerCallAll")
)
// pRpcMsg (RPC_MESSAGE* in/out)
r1, _, err := procNdrServerCallAll.Call(
uintptr(pRpcMsg),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // voidprocedure NdrServerCallAll(
pRpcMsg: Pointer // RPC_MESSAGE* in/out
); stdcall;
external 'RPCRT4.dll' name 'NdrServerCallAll';result := DllCall("RPCRT4\NdrServerCallAll"
, "Ptr", pRpcMsg ; RPC_MESSAGE* in/out
, "Int") ; return: void●NdrServerCallAll(pRpcMsg) = DLL("RPCRT4.dll", "int NdrServerCallAll(void*)")
# 呼び出し: NdrServerCallAll(pRpcMsg)
# pRpcMsg : RPC_MESSAGE* in/out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。