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

GdipPathIterNextPathType

関数
パスイテレータで同一型が続く次の点群の範囲を取得する。
DLLgdiplus.dll呼出規約winapi

シグネチャ

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

Status GdipPathIterNextPathType(
    GpPathIterator* iterator,
    INT* resultCount,
    BYTE* pathType,
    INT* startIndex,
    INT* endIndex
);

パラメーター

名前方向
iteratorGpPathIterator*inout
resultCountINT*out
pathTypeBYTE*out
startIndexINT*out
endIndexINT*out

戻り値の型: Status

各言語での呼び出し定義

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

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

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

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

var (
	gdiplus = windows.NewLazySystemDLL("gdiplus.dll")
	procGdipPathIterNextPathType = gdiplus.NewProc("GdipPathIterNextPathType")
)

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