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