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