Win32 API 日本語リファレンス
ホームGraphics.GdiPlus › GdipPathIterNextSubpathPath

GdipPathIterNextSubpathPath

関数
パスイテレータで次のサブパスをパスとして取得する。
DLLgdiplus.dll呼出規約winapi

シグネチャ

// gdiplus.dll
#include <windows.h>

Status GdipPathIterNextSubpathPath(
    GpPathIterator* iterator,
    INT* resultCount,
    GpPath* path,
    BOOL* isClosed
);

パラメーター

名前方向
iteratorGpPathIterator*inout
resultCountINT*inout
pathGpPath*inout
isClosedBOOL*inout

戻り値の型: Status

各言語での呼び出し定義

// gdiplus.dll
#include <windows.h>

Status GdipPathIterNextSubpathPath(
    GpPathIterator* iterator,
    INT* resultCount,
    GpPath* path,
    BOOL* isClosed
);
[DllImport("gdiplus.dll", ExactSpelling = true)]
static extern int GdipPathIterNextSubpathPath(
    IntPtr iterator,   // GpPathIterator* in/out
    ref int resultCount,   // INT* in/out
    IntPtr path,   // GpPath* in/out
    ref int isClosed   // BOOL* in/out
);
<DllImport("gdiplus.dll", ExactSpelling:=True)>
Public Shared Function GdipPathIterNextSubpathPath(
    iterator As IntPtr,   ' GpPathIterator* in/out
    ByRef resultCount As Integer,   ' INT* in/out
    path As IntPtr,   ' GpPath* in/out
    ByRef isClosed As Integer   ' BOOL* in/out
) As Integer
End Function
' iterator : GpPathIterator* in/out
' resultCount : INT* in/out
' path : GpPath* in/out
' isClosed : BOOL* in/out
Declare PtrSafe Function GdipPathIterNextSubpathPath Lib "gdiplus" ( _
    ByVal iterator As LongPtr, _
    ByRef resultCount As Long, _
    ByVal path As LongPtr, _
    ByRef isClosed As Long) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

GdipPathIterNextSubpathPath = ctypes.windll.gdiplus.GdipPathIterNextSubpathPath
GdipPathIterNextSubpathPath.restype = ctypes.c_int
GdipPathIterNextSubpathPath.argtypes = [
    ctypes.c_void_p,  # iterator : GpPathIterator* in/out
    ctypes.POINTER(ctypes.c_int),  # resultCount : INT* in/out
    ctypes.c_void_p,  # path : GpPath* in/out
    ctypes.c_void_p,  # isClosed : BOOL* in/out
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('gdiplus.dll')
GdipPathIterNextSubpathPath = Fiddle::Function.new(
  lib['GdipPathIterNextSubpathPath'],
  [
    Fiddle::TYPE_VOIDP,  # iterator : GpPathIterator* in/out
    Fiddle::TYPE_VOIDP,  # resultCount : INT* in/out
    Fiddle::TYPE_VOIDP,  # path : GpPath* in/out
    Fiddle::TYPE_VOIDP,  # isClosed : BOOL* in/out
  ],
  Fiddle::TYPE_INT)
#[link(name = "gdiplus")]
extern "system" {
    fn GdipPathIterNextSubpathPath(
        iterator: *mut GpPathIterator,  // GpPathIterator* in/out
        resultCount: *mut i32,  // INT* in/out
        path: *mut GpPath,  // GpPath* in/out
        isClosed: *mut i32  // BOOL* in/out
    ) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("gdiplus.dll")]
public static extern int GdipPathIterNextSubpathPath(IntPtr iterator, ref int resultCount, IntPtr path, ref int isClosed);
"@
$api = Add-Type -MemberDefinition $sig -Name 'gdiplus_GdipPathIterNextSubpathPath' -Namespace Win32 -PassThru
# $api::GdipPathIterNextSubpathPath(iterator, resultCount, path, isClosed)
#uselib "gdiplus.dll"
#func global GdipPathIterNextSubpathPath "GdipPathIterNextSubpathPath" sptr, sptr, sptr, sptr
; GdipPathIterNextSubpathPath varptr(iterator), varptr(resultCount), varptr(path), isClosed   ; 戻り値は stat
; iterator : GpPathIterator* in/out -> "sptr"
; resultCount : INT* in/out -> "sptr"
; path : GpPath* in/out -> "sptr"
; isClosed : BOOL* in/out -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
出力引数:
#uselib "gdiplus.dll"
#cfunc global GdipPathIterNextSubpathPath "GdipPathIterNextSubpathPath" var, var, var, int
; res = GdipPathIterNextSubpathPath(iterator, resultCount, path, isClosed)
; iterator : GpPathIterator* in/out -> "var"
; resultCount : INT* in/out -> "var"
; path : GpPath* in/out -> "var"
; isClosed : BOOL* in/out -> "int"
; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。
出力引数:
; Status GdipPathIterNextSubpathPath(GpPathIterator* iterator, INT* resultCount, GpPath* path, BOOL* isClosed)
#uselib "gdiplus.dll"
#cfunc global GdipPathIterNextSubpathPath "GdipPathIterNextSubpathPath" var, var, var, int
; res = GdipPathIterNextSubpathPath(iterator, resultCount, path, isClosed)
; iterator : GpPathIterator* in/out -> "var"
; resultCount : INT* in/out -> "var"
; path : GpPath* in/out -> "var"
; isClosed : BOOL* in/out -> "int"
; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	gdiplus = windows.NewLazySystemDLL("gdiplus.dll")
	procGdipPathIterNextSubpathPath = gdiplus.NewProc("GdipPathIterNextSubpathPath")
)

// iterator (GpPathIterator* in/out), resultCount (INT* in/out), path (GpPath* in/out), isClosed (BOOL* in/out)
r1, _, err := procGdipPathIterNextSubpathPath.Call(
	uintptr(iterator),
	uintptr(resultCount),
	uintptr(path),
	uintptr(isClosed),
)
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // Status
function GdipPathIterNextSubpathPath(
  iterator: Pointer;   // GpPathIterator* in/out
  resultCount: Pointer;   // INT* in/out
  path: Pointer;   // GpPath* in/out
  isClosed: Pointer   // BOOL* in/out
): Integer; stdcall;
  external 'gdiplus.dll' name 'GdipPathIterNextSubpathPath';
result := DllCall("gdiplus\GdipPathIterNextSubpathPath"
    , "Ptr", iterator   ; GpPathIterator* in/out
    , "Ptr", resultCount   ; INT* in/out
    , "Ptr", path   ; GpPath* in/out
    , "Ptr", isClosed   ; BOOL* in/out
    , "Int")   ; return: Status
●GdipPathIterNextSubpathPath(iterator, resultCount, path, isClosed) = DLL("gdiplus.dll", "int GdipPathIterNextSubpathPath(void*, void*, void*, void*)")
# 呼び出し: GdipPathIterNextSubpathPath(iterator, resultCount, path, isClosed)
# iterator : GpPathIterator* in/out -> "void*"
# resultCount : INT* in/out -> "void*"
# path : GpPath* in/out -> "void*"
# isClosed : BOOL* in/out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。