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

GdipPathIterNextSubpath

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

シグネチャ

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

Status GdipPathIterNextSubpath(
    GpPathIterator* iterator,
    INT* resultCount,
    INT* startIndex,
    INT* endIndex,
    BOOL* isClosed
);

パラメーター

名前方向
iteratorGpPathIterator*inout
resultCountINT*inout
startIndexINT*inout
endIndexINT*inout
isClosedBOOL*inout

戻り値の型: Status

各言語での呼び出し定義

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

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

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

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

var (
	gdiplus = windows.NewLazySystemDLL("gdiplus.dll")
	procGdipPathIterNextSubpath = gdiplus.NewProc("GdipPathIterNextSubpath")
)

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