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