ホーム › Media.MediaFoundation › MFHeapFree
MFHeapFree
関数MFHeapAllocで確保したメモリーを解放する。
シグネチャ
// MFPlat.dll
#include <windows.h>
void MFHeapFree(
void* pv
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| pv | void* | inout |
戻り値の型: void
各言語での呼び出し定義
// MFPlat.dll
#include <windows.h>
void MFHeapFree(
void* pv
);[DllImport("MFPlat.dll", ExactSpelling = true)]
static extern void MFHeapFree(
IntPtr pv // void* in/out
);<DllImport("MFPlat.dll", ExactSpelling:=True)>
Public Shared Sub MFHeapFree(
pv As IntPtr ' void* in/out
)
End Sub' pv : void* in/out
Declare PtrSafe Sub MFHeapFree Lib "mfplat" ( _
ByVal pv As LongPtr)
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
MFHeapFree = ctypes.windll.mfplat.MFHeapFree
MFHeapFree.restype = None
MFHeapFree.argtypes = [
ctypes.POINTER(None), # pv : void* in/out
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('MFPlat.dll')
MFHeapFree = Fiddle::Function.new(
lib['MFHeapFree'],
[
Fiddle::TYPE_VOIDP, # pv : void* in/out
],
Fiddle::TYPE_VOID)#[link(name = "mfplat")]
extern "system" {
fn MFHeapFree(
pv: *mut () // void* in/out
);
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("MFPlat.dll")]
public static extern void MFHeapFree(IntPtr pv);
"@
$api = Add-Type -MemberDefinition $sig -Name 'MFPlat_MFHeapFree' -Namespace Win32 -PassThru
# $api::MFHeapFree(pv)#uselib "MFPlat.dll"
#func global MFHeapFree "MFHeapFree" sptr
; MFHeapFree pv
; pv : void* in/out -> "sptr"#uselib "MFPlat.dll"
#func global MFHeapFree "MFHeapFree" sptr
; MFHeapFree pv
; pv : void* in/out -> "sptr"; void MFHeapFree(void* pv)
#uselib "MFPlat.dll"
#func global MFHeapFree "MFHeapFree" intptr
; MFHeapFree pv
; pv : void* in/out -> "intptr"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
mfplat = windows.NewLazySystemDLL("MFPlat.dll")
procMFHeapFree = mfplat.NewProc("MFHeapFree")
)
// pv (void* in/out)
r1, _, err := procMFHeapFree.Call(
uintptr(pv),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // voidprocedure MFHeapFree(
pv: Pointer // void* in/out
); stdcall;
external 'MFPlat.dll' name 'MFHeapFree';result := DllCall("MFPlat\MFHeapFree"
, "Ptr", pv ; void* in/out
, "Int") ; return: void●MFHeapFree(pv) = DLL("MFPlat.dll", "int MFHeapFree(void*)")
# 呼び出し: MFHeapFree(pv)
# pv : void* in/out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。