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