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