ホーム › UI.Accessibility › IUIAutomation5
IUIAutomation5
COM公式ドキュメント
IUIAutomation4 インターフェースを拡張し、Microsoft UI Automation の機能を制御するための追加メソッドを公開します。
メソッド 2
vtbl = vtable インデックス(0始まり)。HSP等からCOMメソッドをインデックス指定で呼ぶ際に使用します。0〜2 は IUnknown。
vtbl 68 HRESULT AddNotificationEventHandler(IUIAutomationElement* element, TreeScope scope, IUIAutomationCacheRequest* cacheRequest, IUIAutomationNotificationEventHandler* handler)
通知イベントを処理するメソッドを登録します。メモ イベントハンドラーを実装する前に、Understanding Threading Issues で説明されているスレッドの問題について理解しておく必要があります。
| element | IUIAutomationElement* | in | イベントハンドラーに関連付けられている UI Automation 要素へのポインター。 |
| scope | TreeScope | in | 処理するイベントのスコープ。つまり、要素自体に対するイベントか、その祖先および子孫に対するイベントかを指定します。 |
| cacheRequest | IUIAutomationCacheRequest* | in | キャッシュ要求へのポインター。キャッシュが不要な場合は NULL。 |
| handler | IUIAutomationNotificationEventHandler* | in | 通知イベントを処理するオブジェクトへのポインター。 |
戻り値
vtbl 69 HRESULT RemoveNotificationEventHandler(IUIAutomationElement* element, IUIAutomationNotificationEventHandler* handler)
通知イベントハンドラーを削除します。
| element | IUIAutomationElement* | in | ハンドラーを削除する対象の UI Automation 要素へのポインター。 |
| handler | IUIAutomationNotificationEventHandler* | in | AddNotificationEventHandler に渡されたインターフェースへのポインター。 |
戻り値
出典・ライセンス: 上記「公式ドキュメント」の内容は Microsoft の Win32 API ドキュメント(MicrosoftDocs/sdk-api)を日本語に翻訳・改変したものです。© Microsoft Corporation. CC BY 4.0 で提供。
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)
HSP用 COM定義
#usecom / #comfunc によるHSPのCOM呼び出し定義。数字は vtbl インデックス(0始まり)。クラスIDが無い場合 #usecom の末尾は "{}"、ある場合は "{CLSID}"。
#define global IID_IUIAutomation5 "{25F700C8-D816-4057-A9DC-3CBDEE77E256}"
#usecom global IUIAutomation5 IID_IUIAutomation5 "{}"
#comfunc global IUIAutomation5_AddNotificationEventHandler 68 sptr,int,sptr,sptr
#comfunc global IUIAutomation5_RemoveNotificationEventHandler 69 sptr,sptr
; ※数字は vtbl インデックス(0始まり)。0/1/2 は IUnknown(QueryInterface/AddRef/Release)。
; ※このインターフェースは直接 CoCreateInstance するクラスIDが無いため "{}"(他メソッド/アクティベーションで取得)。
; ※ハンドル/void*等の不透明ポインタは IronHSP では intptr 指定が可能。