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