ホーム › UI.Accessibility › SynchronizedInputPattern_StartListening
SynchronizedInputPattern_StartListening
関数指定種類の同期入力イベントの監視を開始する。
シグネチャ
// UIAutomationCore.dll
#include <windows.h>
HRESULT SynchronizedInputPattern_StartListening(
HUIAPATTERNOBJECT hobj,
SynchronizedInputType inputType
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| hobj | HUIAPATTERNOBJECT | in |
| inputType | SynchronizedInputType | in |
戻り値の型: HRESULT
各言語での呼び出し定義
// UIAutomationCore.dll
#include <windows.h>
HRESULT SynchronizedInputPattern_StartListening(
HUIAPATTERNOBJECT hobj,
SynchronizedInputType inputType
);[DllImport("UIAutomationCore.dll", ExactSpelling = true)]
static extern int SynchronizedInputPattern_StartListening(
IntPtr hobj, // HUIAPATTERNOBJECT
int inputType // SynchronizedInputType
);<DllImport("UIAutomationCore.dll", ExactSpelling:=True)>
Public Shared Function SynchronizedInputPattern_StartListening(
hobj As IntPtr, ' HUIAPATTERNOBJECT
inputType As Integer ' SynchronizedInputType
) As Integer
End Function' hobj : HUIAPATTERNOBJECT
' inputType : SynchronizedInputType
Declare PtrSafe Function SynchronizedInputPattern_StartListening Lib "uiautomationcore" ( _
ByVal hobj As LongPtr, _
ByVal inputType As Long) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
SynchronizedInputPattern_StartListening = ctypes.windll.uiautomationcore.SynchronizedInputPattern_StartListening
SynchronizedInputPattern_StartListening.restype = ctypes.c_int
SynchronizedInputPattern_StartListening.argtypes = [
wintypes.HANDLE, # hobj : HUIAPATTERNOBJECT
ctypes.c_int, # inputType : SynchronizedInputType
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('UIAutomationCore.dll')
SynchronizedInputPattern_StartListening = Fiddle::Function.new(
lib['SynchronizedInputPattern_StartListening'],
[
Fiddle::TYPE_VOIDP, # hobj : HUIAPATTERNOBJECT
Fiddle::TYPE_INT, # inputType : SynchronizedInputType
],
Fiddle::TYPE_INT)#[link(name = "uiautomationcore")]
extern "system" {
fn SynchronizedInputPattern_StartListening(
hobj: *mut core::ffi::c_void, // HUIAPATTERNOBJECT
inputType: i32 // SynchronizedInputType
) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("UIAutomationCore.dll")]
public static extern int SynchronizedInputPattern_StartListening(IntPtr hobj, int inputType);
"@
$api = Add-Type -MemberDefinition $sig -Name 'UIAutomationCore_SynchronizedInputPattern_StartListening' -Namespace Win32 -PassThru
# $api::SynchronizedInputPattern_StartListening(hobj, inputType)#uselib "UIAutomationCore.dll"
#func global SynchronizedInputPattern_StartListening "SynchronizedInputPattern_StartListening" sptr, sptr
; SynchronizedInputPattern_StartListening hobj, inputType ; 戻り値は stat
; hobj : HUIAPATTERNOBJECT -> "sptr"
; inputType : SynchronizedInputType -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "UIAutomationCore.dll"
#cfunc global SynchronizedInputPattern_StartListening "SynchronizedInputPattern_StartListening" sptr, int
; res = SynchronizedInputPattern_StartListening(hobj, inputType)
; hobj : HUIAPATTERNOBJECT -> "sptr"
; inputType : SynchronizedInputType -> "int"; HRESULT SynchronizedInputPattern_StartListening(HUIAPATTERNOBJECT hobj, SynchronizedInputType inputType)
#uselib "UIAutomationCore.dll"
#cfunc global SynchronizedInputPattern_StartListening "SynchronizedInputPattern_StartListening" intptr, int
; res = SynchronizedInputPattern_StartListening(hobj, inputType)
; hobj : HUIAPATTERNOBJECT -> "intptr"
; inputType : SynchronizedInputType -> "int"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
uiautomationcore = windows.NewLazySystemDLL("UIAutomationCore.dll")
procSynchronizedInputPattern_StartListening = uiautomationcore.NewProc("SynchronizedInputPattern_StartListening")
)
// hobj (HUIAPATTERNOBJECT), inputType (SynchronizedInputType)
r1, _, err := procSynchronizedInputPattern_StartListening.Call(
uintptr(hobj),
uintptr(inputType),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // HRESULTfunction SynchronizedInputPattern_StartListening(
hobj: THandle; // HUIAPATTERNOBJECT
inputType: Integer // SynchronizedInputType
): Integer; stdcall;
external 'UIAutomationCore.dll' name 'SynchronizedInputPattern_StartListening';result := DllCall("UIAutomationCore\SynchronizedInputPattern_StartListening"
, "Ptr", hobj ; HUIAPATTERNOBJECT
, "Int", inputType ; SynchronizedInputType
, "Int") ; return: HRESULT●SynchronizedInputPattern_StartListening(hobj, inputType) = DLL("UIAutomationCore.dll", "int SynchronizedInputPattern_StartListening(void*, int)")
# 呼び出し: SynchronizedInputPattern_StartListening(hobj, inputType)
# hobj : HUIAPATTERNOBJECT -> "void*"
# inputType : SynchronizedInputType -> "int"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。