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

NdrServerCallNdr64

関数
NDR64形式のRPCサーバー呼び出しを処理する。
DLLRPCRT4.dll呼出規約winapi

シグネチャ

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

void NdrServerCallNdr64(
    RPC_MESSAGE* pRpcMsg
);

パラメーター

名前方向
pRpcMsgRPC_MESSAGE*inout

戻り値の型: void

各言語での呼び出し定義

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

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

NdrServerCallNdr64 = ctypes.windll.rpcrt4.NdrServerCallNdr64
NdrServerCallNdr64.restype = None
NdrServerCallNdr64.argtypes = [
    ctypes.c_void_p,  # pRpcMsg : RPC_MESSAGE* in/out
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('RPCRT4.dll')
NdrServerCallNdr64 = Fiddle::Function.new(
  lib['NdrServerCallNdr64'],
  [
    Fiddle::TYPE_VOIDP,  # pRpcMsg : RPC_MESSAGE* in/out
  ],
  Fiddle::TYPE_VOID)
#[link(name = "rpcrt4")]
extern "system" {
    fn NdrServerCallNdr64(
        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 NdrServerCallNdr64(IntPtr pRpcMsg);
"@
$api = Add-Type -MemberDefinition $sig -Name 'RPCRT4_NdrServerCallNdr64' -Namespace Win32 -PassThru
# $api::NdrServerCallNdr64(pRpcMsg)
#uselib "RPCRT4.dll"
#func global NdrServerCallNdr64 "NdrServerCallNdr64" sptr
; NdrServerCallNdr64 varptr(pRpcMsg)
; pRpcMsg : RPC_MESSAGE* in/out -> "sptr"
出力引数:
#uselib "RPCRT4.dll"
#func global NdrServerCallNdr64 "NdrServerCallNdr64" var
; NdrServerCallNdr64 pRpcMsg
; pRpcMsg : RPC_MESSAGE* in/out -> "var"
; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。
出力引数:
; void NdrServerCallNdr64(RPC_MESSAGE* pRpcMsg)
#uselib "RPCRT4.dll"
#func global NdrServerCallNdr64 "NdrServerCallNdr64" var
; NdrServerCallNdr64 pRpcMsg
; pRpcMsg : RPC_MESSAGE* in/out -> "var"
; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	rpcrt4 = windows.NewLazySystemDLL("RPCRT4.dll")
	procNdrServerCallNdr64 = rpcrt4.NewProc("NdrServerCallNdr64")
)

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