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