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

RpcSsEnableAllocate

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

シグネチャ

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

void RpcSsEnableAllocate(void);

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

各言語での呼び出し定義

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

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

RpcSsEnableAllocate = ctypes.windll.rpcrt4.RpcSsEnableAllocate
RpcSsEnableAllocate.restype = None
RpcSsEnableAllocate.argtypes = []
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('RPCRT4.dll')
RpcSsEnableAllocate = Fiddle::Function.new(
  lib['RpcSsEnableAllocate'],
  [],
  Fiddle::TYPE_VOID)
#[link(name = "rpcrt4")]
extern "system" {
    fn RpcSsEnableAllocate();
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("RPCRT4.dll")]
public static extern void RpcSsEnableAllocate();
"@
$api = Add-Type -MemberDefinition $sig -Name 'RPCRT4_RpcSsEnableAllocate' -Namespace Win32 -PassThru
# $api::RpcSsEnableAllocate()
#uselib "RPCRT4.dll"
#func global RpcSsEnableAllocate "RpcSsEnableAllocate"
; RpcSsEnableAllocate
#uselib "RPCRT4.dll"
#func global RpcSsEnableAllocate "RpcSsEnableAllocate"
; RpcSsEnableAllocate
; void RpcSsEnableAllocate()
#uselib "RPCRT4.dll"
#func global RpcSsEnableAllocate "RpcSsEnableAllocate"
; RpcSsEnableAllocate
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	rpcrt4 = windows.NewLazySystemDLL("RPCRT4.dll")
	procRpcSsEnableAllocate = rpcrt4.NewProc("RpcSsEnableAllocate")
)

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