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