Win32 API 日本語リファレンス
ホームGraphics.GdiPlus › GdipDeleteCachedBitmap

GdipDeleteCachedBitmap

関数
キャッシュ済みビットマップを削除する。
DLLgdiplus.dll呼出規約winapi

シグネチャ

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

Status GdipDeleteCachedBitmap(
    GpCachedBitmap* cachedBitmap
);

パラメーター

名前方向
cachedBitmapGpCachedBitmap*inout

戻り値の型: Status

各言語での呼び出し定義

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

Status GdipDeleteCachedBitmap(
    GpCachedBitmap* cachedBitmap
);
[DllImport("gdiplus.dll", ExactSpelling = true)]
static extern int GdipDeleteCachedBitmap(
    IntPtr cachedBitmap   // GpCachedBitmap* in/out
);
<DllImport("gdiplus.dll", ExactSpelling:=True)>
Public Shared Function GdipDeleteCachedBitmap(
    cachedBitmap As IntPtr   ' GpCachedBitmap* in/out
) As Integer
End Function
' cachedBitmap : GpCachedBitmap* in/out
Declare PtrSafe Function GdipDeleteCachedBitmap Lib "gdiplus" ( _
    ByVal cachedBitmap As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

GdipDeleteCachedBitmap = ctypes.windll.gdiplus.GdipDeleteCachedBitmap
GdipDeleteCachedBitmap.restype = ctypes.c_int
GdipDeleteCachedBitmap.argtypes = [
    ctypes.c_void_p,  # cachedBitmap : GpCachedBitmap* in/out
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('gdiplus.dll')
GdipDeleteCachedBitmap = Fiddle::Function.new(
  lib['GdipDeleteCachedBitmap'],
  [
    Fiddle::TYPE_VOIDP,  # cachedBitmap : GpCachedBitmap* in/out
  ],
  Fiddle::TYPE_INT)
#[link(name = "gdiplus")]
extern "system" {
    fn GdipDeleteCachedBitmap(
        cachedBitmap: *mut GpCachedBitmap  // GpCachedBitmap* in/out
    ) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("gdiplus.dll")]
public static extern int GdipDeleteCachedBitmap(IntPtr cachedBitmap);
"@
$api = Add-Type -MemberDefinition $sig -Name 'gdiplus_GdipDeleteCachedBitmap' -Namespace Win32 -PassThru
# $api::GdipDeleteCachedBitmap(cachedBitmap)
#uselib "gdiplus.dll"
#func global GdipDeleteCachedBitmap "GdipDeleteCachedBitmap" sptr
; GdipDeleteCachedBitmap varptr(cachedBitmap)   ; 戻り値は stat
; cachedBitmap : GpCachedBitmap* in/out -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
出力引数:
#uselib "gdiplus.dll"
#cfunc global GdipDeleteCachedBitmap "GdipDeleteCachedBitmap" var
; res = GdipDeleteCachedBitmap(cachedBitmap)
; cachedBitmap : GpCachedBitmap* in/out -> "var"
; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。
出力引数:
; Status GdipDeleteCachedBitmap(GpCachedBitmap* cachedBitmap)
#uselib "gdiplus.dll"
#cfunc global GdipDeleteCachedBitmap "GdipDeleteCachedBitmap" var
; res = GdipDeleteCachedBitmap(cachedBitmap)
; cachedBitmap : GpCachedBitmap* in/out -> "var"
; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	gdiplus = windows.NewLazySystemDLL("gdiplus.dll")
	procGdipDeleteCachedBitmap = gdiplus.NewProc("GdipDeleteCachedBitmap")
)

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