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

RpcSmDisableAllocate

関数
RPCスタブのメモリ管理環境を無効化し解放する。
DLLRPCRT4.dll呼出規約winapi対応OSWindows 2000 以降

シグネチャ

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

RPC_STATUS RpcSmDisableAllocate(void);

パラメーターなし。戻り値: RPC_STATUS

各言語での呼び出し定義

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

RPC_STATUS RpcSmDisableAllocate(void);
[DllImport("RPCRT4.dll", ExactSpelling = true)]
static extern int RpcSmDisableAllocate();
<DllImport("RPCRT4.dll", ExactSpelling:=True)>
Public Shared Function RpcSmDisableAllocate() As Integer
End Function
Declare PtrSafe Function RpcSmDisableAllocate Lib "rpcrt4" () As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

RpcSmDisableAllocate = ctypes.windll.rpcrt4.RpcSmDisableAllocate
RpcSmDisableAllocate.restype = ctypes.c_int
RpcSmDisableAllocate.argtypes = []
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('RPCRT4.dll')
RpcSmDisableAllocate = Fiddle::Function.new(
  lib['RpcSmDisableAllocate'],
  [],
  Fiddle::TYPE_INT)
#[link(name = "rpcrt4")]
extern "system" {
    fn RpcSmDisableAllocate() -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("RPCRT4.dll")]
public static extern int RpcSmDisableAllocate();
"@
$api = Add-Type -MemberDefinition $sig -Name 'RPCRT4_RpcSmDisableAllocate' -Namespace Win32 -PassThru
# $api::RpcSmDisableAllocate()
#uselib "RPCRT4.dll"
#func global RpcSmDisableAllocate "RpcSmDisableAllocate"
; RpcSmDisableAllocate   ; 戻り値は stat
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
#uselib "RPCRT4.dll"
#cfunc global RpcSmDisableAllocate "RpcSmDisableAllocate"
; res = RpcSmDisableAllocate()
; RPC_STATUS RpcSmDisableAllocate()
#uselib "RPCRT4.dll"
#cfunc global RpcSmDisableAllocate "RpcSmDisableAllocate"
; res = RpcSmDisableAllocate()
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	rpcrt4 = windows.NewLazySystemDLL("RPCRT4.dll")
	procRpcSmDisableAllocate = rpcrt4.NewProc("RpcSmDisableAllocate")
)

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