Win32 API 日本語リファレンス
ホームNetworkManagement.Rras › MprConfigBufferFree

MprConfigBufferFree

関数
MprConfig関数が割り当てたバッファを解放する。
DLLMPRAPI.dll呼出規約winapi対応OSwindowsserver2000

シグネチャ

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

DWORD MprConfigBufferFree(
    void* pBuffer
);

パラメーター

名前方向
pBuffervoid*in

戻り値の型: DWORD

各言語での呼び出し定義

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

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

MprConfigBufferFree = ctypes.windll.mprapi.MprConfigBufferFree
MprConfigBufferFree.restype = wintypes.DWORD
MprConfigBufferFree.argtypes = [
    ctypes.POINTER(None),  # pBuffer : void*
]
require 'fiddle'
require 'fiddle/import'

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

var (
	mprapi = windows.NewLazySystemDLL("MPRAPI.dll")
	procMprConfigBufferFree = mprapi.NewProc("MprConfigBufferFree")
)

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