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