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

GdiplusShutdown

関数
GDI+の使用を終了し関連リソースを解放する。
DLLgdiplus.dll呼出規約winapi対応OSWindows XP 以降

シグネチャ

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

void GdiplusShutdown(
    UINT_PTR token
);

パラメーター

名前方向
tokenUINT_PTRin

戻り値の型: void

各言語での呼び出し定義

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

void GdiplusShutdown(
    UINT_PTR token
);
[DllImport("gdiplus.dll", ExactSpelling = true)]
static extern void GdiplusShutdown(
    UIntPtr token   // UINT_PTR
);
<DllImport("gdiplus.dll", ExactSpelling:=True)>
Public Shared Sub GdiplusShutdown(
    token As UIntPtr   ' UINT_PTR
)
End Sub
' token : UINT_PTR
Declare PtrSafe Sub GdiplusShutdown Lib "gdiplus" ( _
    ByVal token As LongPtr)
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

GdiplusShutdown = ctypes.windll.gdiplus.GdiplusShutdown
GdiplusShutdown.restype = None
GdiplusShutdown.argtypes = [
    ctypes.c_size_t,  # token : UINT_PTR
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('gdiplus.dll')
GdiplusShutdown = Fiddle::Function.new(
  lib['GdiplusShutdown'],
  [
    Fiddle::TYPE_UINTPTR_T,  # token : UINT_PTR
  ],
  Fiddle::TYPE_VOID)
#[link(name = "gdiplus")]
extern "system" {
    fn GdiplusShutdown(
        token: usize  // UINT_PTR
    );
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("gdiplus.dll")]
public static extern void GdiplusShutdown(UIntPtr token);
"@
$api = Add-Type -MemberDefinition $sig -Name 'gdiplus_GdiplusShutdown' -Namespace Win32 -PassThru
# $api::GdiplusShutdown(token)
#uselib "gdiplus.dll"
#func global GdiplusShutdown "GdiplusShutdown" sptr
; GdiplusShutdown token
; token : UINT_PTR -> "sptr"
#uselib "gdiplus.dll"
#func global GdiplusShutdown "GdiplusShutdown" sptr
; GdiplusShutdown token
; token : UINT_PTR -> "sptr"
; void GdiplusShutdown(UINT_PTR token)
#uselib "gdiplus.dll"
#func global GdiplusShutdown "GdiplusShutdown" intptr
; GdiplusShutdown token
; token : UINT_PTR -> "intptr"
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	gdiplus = windows.NewLazySystemDLL("gdiplus.dll")
	procGdiplusShutdown = gdiplus.NewProc("GdiplusShutdown")
)

// token (UINT_PTR)
r1, _, err := procGdiplusShutdown.Call(
	uintptr(token),
)
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // void
procedure GdiplusShutdown(
  token: NativeUInt   // UINT_PTR
); stdcall;
  external 'gdiplus.dll' name 'GdiplusShutdown';
result := DllCall("gdiplus\GdiplusShutdown"
    , "UPtr", token   ; UINT_PTR
    , "Int")   ; return: void
●GdiplusShutdown(token) = DLL("gdiplus.dll", "int GdiplusShutdown(int)")
# 呼び出し: GdiplusShutdown(token)
# token : UINT_PTR -> "int"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。