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

NdrRpcSsDefaultFree

関数
NDRスタブの既定メモリ解放関数でメモリを解放する。
DLLRPCRT4.dll呼出規約winapi

シグネチャ

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

void NdrRpcSsDefaultFree(
    void* NodeToFree
);

パラメーター

名前方向
NodeToFreevoid*in

戻り値の型: void

各言語での呼び出し定義

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

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

NdrRpcSsDefaultFree = ctypes.windll.rpcrt4.NdrRpcSsDefaultFree
NdrRpcSsDefaultFree.restype = None
NdrRpcSsDefaultFree.argtypes = [
    ctypes.POINTER(None),  # NodeToFree : void*
]
require 'fiddle'
require 'fiddle/import'

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

var (
	rpcrt4 = windows.NewLazySystemDLL("RPCRT4.dll")
	procNdrRpcSsDefaultFree = rpcrt4.NewProc("NdrRpcSsDefaultFree")
)

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