ホーム › UI.Accessibility › TransformPattern_Move
TransformPattern_Move
関数Transformパターンで要素を指定座標へ移動する。
シグネチャ
// UIAutomationCore.dll
#include <windows.h>
HRESULT TransformPattern_Move(
HUIAPATTERNOBJECT hobj,
DOUBLE x,
DOUBLE y
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| hobj | HUIAPATTERNOBJECT | in |
| x | DOUBLE | in |
| y | DOUBLE | in |
戻り値の型: HRESULT
各言語での呼び出し定義
// UIAutomationCore.dll
#include <windows.h>
HRESULT TransformPattern_Move(
HUIAPATTERNOBJECT hobj,
DOUBLE x,
DOUBLE y
);[DllImport("UIAutomationCore.dll", ExactSpelling = true)]
static extern int TransformPattern_Move(
IntPtr hobj, // HUIAPATTERNOBJECT
double x, // DOUBLE
double y // DOUBLE
);<DllImport("UIAutomationCore.dll", ExactSpelling:=True)>
Public Shared Function TransformPattern_Move(
hobj As IntPtr, ' HUIAPATTERNOBJECT
x As Double, ' DOUBLE
y As Double ' DOUBLE
) As Integer
End Function' hobj : HUIAPATTERNOBJECT
' x : DOUBLE
' y : DOUBLE
Declare PtrSafe Function TransformPattern_Move Lib "uiautomationcore" ( _
ByVal hobj As LongPtr, _
ByVal x As Double, _
ByVal y As Double) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
TransformPattern_Move = ctypes.windll.uiautomationcore.TransformPattern_Move
TransformPattern_Move.restype = ctypes.c_int
TransformPattern_Move.argtypes = [
wintypes.HANDLE, # hobj : HUIAPATTERNOBJECT
ctypes.c_double, # x : DOUBLE
ctypes.c_double, # y : DOUBLE
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('UIAutomationCore.dll')
TransformPattern_Move = Fiddle::Function.new(
lib['TransformPattern_Move'],
[
Fiddle::TYPE_VOIDP, # hobj : HUIAPATTERNOBJECT
Fiddle::TYPE_DOUBLE, # x : DOUBLE
Fiddle::TYPE_DOUBLE, # y : DOUBLE
],
Fiddle::TYPE_INT)#[link(name = "uiautomationcore")]
extern "system" {
fn TransformPattern_Move(
hobj: *mut core::ffi::c_void, // HUIAPATTERNOBJECT
x: f64, // DOUBLE
y: f64 // DOUBLE
) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("UIAutomationCore.dll")]
public static extern int TransformPattern_Move(IntPtr hobj, double x, double y);
"@
$api = Add-Type -MemberDefinition $sig -Name 'UIAutomationCore_TransformPattern_Move' -Namespace Win32 -PassThru
# $api::TransformPattern_Move(hobj, x, y)#uselib "UIAutomationCore.dll"
#func global TransformPattern_Move "TransformPattern_Move" sptr, double, double
; TransformPattern_Move hobj, x, y ; 戻り値は stat
; hobj : HUIAPATTERNOBJECT -> "sptr"
; x : DOUBLE -> "double"
; y : DOUBLE -> "double"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "UIAutomationCore.dll"
#cfunc global TransformPattern_Move "TransformPattern_Move" sptr, double, double
; res = TransformPattern_Move(hobj, x, y)
; hobj : HUIAPATTERNOBJECT -> "sptr"
; x : DOUBLE -> "double"
; y : DOUBLE -> "double"; HRESULT TransformPattern_Move(HUIAPATTERNOBJECT hobj, DOUBLE x, DOUBLE y)
#uselib "UIAutomationCore.dll"
#cfunc global TransformPattern_Move "TransformPattern_Move" intptr, double, double
; res = TransformPattern_Move(hobj, x, y)
; hobj : HUIAPATTERNOBJECT -> "intptr"
; x : DOUBLE -> "double"
; y : DOUBLE -> "double"import (
"math"
"golang.org/x/sys/windows"
"unsafe"
)
var (
uiautomationcore = windows.NewLazySystemDLL("UIAutomationCore.dll")
procTransformPattern_Move = uiautomationcore.NewProc("TransformPattern_Move")
)
// hobj (HUIAPATTERNOBJECT), x (DOUBLE), y (DOUBLE)
r1, _, err := procTransformPattern_Move.Call(
uintptr(hobj),
uintptr(math.Float64bits(x)),
uintptr(math.Float64bits(y)),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // HRESULT
// 注意: float/double 引数は proc.Call では XMM レジスタに渡せません。
// windows.SyscallN(proc.Addr(), math.Float64bits(x), ...) もしくは cgo を使用してください。function TransformPattern_Move(
hobj: THandle; // HUIAPATTERNOBJECT
x: Double; // DOUBLE
y: Double // DOUBLE
): Integer; stdcall;
external 'UIAutomationCore.dll' name 'TransformPattern_Move';result := DllCall("UIAutomationCore\TransformPattern_Move"
, "Ptr", hobj ; HUIAPATTERNOBJECT
, "Double", x ; DOUBLE
, "Double", y ; DOUBLE
, "Int") ; return: HRESULT●TransformPattern_Move(hobj, x, y) = DLL("UIAutomationCore.dll", "int TransformPattern_Move(void*, double, double)")
# 呼び出し: TransformPattern_Move(hobj, x, y)
# hobj : HUIAPATTERNOBJECT -> "void*"
# x : DOUBLE -> "double"
# y : DOUBLE -> "double"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。