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