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