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