ホーム › Graphics.GdiPlus › GdipDeleteGraphics
GdipDeleteGraphics
関数Graphicsオブジェクトを破棄して解放する。
シグネチャ
// gdiplus.dll
#include <windows.h>
Status GdipDeleteGraphics(
GpGraphics* graphics
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| graphics | GpGraphics* | inout |
戻り値の型: Status
各言語での呼び出し定義
// gdiplus.dll
#include <windows.h>
Status GdipDeleteGraphics(
GpGraphics* graphics
);[DllImport("gdiplus.dll", ExactSpelling = true)]
static extern int GdipDeleteGraphics(
IntPtr graphics // GpGraphics* in/out
);<DllImport("gdiplus.dll", ExactSpelling:=True)>
Public Shared Function GdipDeleteGraphics(
graphics As IntPtr ' GpGraphics* in/out
) As Integer
End Function' graphics : GpGraphics* in/out
Declare PtrSafe Function GdipDeleteGraphics Lib "gdiplus" ( _
ByVal graphics As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
GdipDeleteGraphics = ctypes.windll.gdiplus.GdipDeleteGraphics
GdipDeleteGraphics.restype = ctypes.c_int
GdipDeleteGraphics.argtypes = [
ctypes.c_void_p, # graphics : GpGraphics* in/out
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('gdiplus.dll')
GdipDeleteGraphics = Fiddle::Function.new(
lib['GdipDeleteGraphics'],
[
Fiddle::TYPE_VOIDP, # graphics : GpGraphics* in/out
],
Fiddle::TYPE_INT)#[link(name = "gdiplus")]
extern "system" {
fn GdipDeleteGraphics(
graphics: *mut GpGraphics // GpGraphics* in/out
) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("gdiplus.dll")]
public static extern int GdipDeleteGraphics(IntPtr graphics);
"@
$api = Add-Type -MemberDefinition $sig -Name 'gdiplus_GdipDeleteGraphics' -Namespace Win32 -PassThru
# $api::GdipDeleteGraphics(graphics)#uselib "gdiplus.dll"
#func global GdipDeleteGraphics "GdipDeleteGraphics" sptr
; GdipDeleteGraphics varptr(graphics) ; 戻り値は stat
; graphics : GpGraphics* in/out -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。出力引数:
#uselib "gdiplus.dll" #cfunc global GdipDeleteGraphics "GdipDeleteGraphics" var ; res = GdipDeleteGraphics(graphics) ; graphics : GpGraphics* in/out -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。#uselib "gdiplus.dll" #cfunc global GdipDeleteGraphics "GdipDeleteGraphics" sptr ; res = GdipDeleteGraphics(varptr(graphics)) ; graphics : GpGraphics* in/out -> "sptr" ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。
出力引数:
; Status GdipDeleteGraphics(GpGraphics* graphics) #uselib "gdiplus.dll" #cfunc global GdipDeleteGraphics "GdipDeleteGraphics" var ; res = GdipDeleteGraphics(graphics) ; graphics : GpGraphics* in/out -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。; Status GdipDeleteGraphics(GpGraphics* graphics) #uselib "gdiplus.dll" #cfunc global GdipDeleteGraphics "GdipDeleteGraphics" intptr ; res = GdipDeleteGraphics(varptr(graphics)) ; graphics : GpGraphics* in/out -> "intptr" ; ※出力/バッファ引数はポインタ方式(token=intptr / 呼び出しは varptr(変数))。
import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
gdiplus = windows.NewLazySystemDLL("gdiplus.dll")
procGdipDeleteGraphics = gdiplus.NewProc("GdipDeleteGraphics")
)
// graphics (GpGraphics* in/out)
r1, _, err := procGdipDeleteGraphics.Call(
uintptr(graphics),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // Statusfunction GdipDeleteGraphics(
graphics: Pointer // GpGraphics* in/out
): Integer; stdcall;
external 'gdiplus.dll' name 'GdipDeleteGraphics';result := DllCall("gdiplus\GdipDeleteGraphics"
, "Ptr", graphics ; GpGraphics* in/out
, "Int") ; return: Status●GdipDeleteGraphics(graphics) = DLL("gdiplus.dll", "int GdipDeleteGraphics(void*)")
# 呼び出し: GdipDeleteGraphics(graphics)
# graphics : GpGraphics* in/out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。