IUIAutomationRegistrar::RegisterEvent 方法 (uiautomationcore.h)

注册第三方 Microsoft UI 自动化 事件。

语法

HRESULT RegisterEvent(
  [in]  const UIAutomationEventInfo *event,
  [out] EVENTID                     *eventId
);

参数

[in] event

类型: UIAutomationEventInfo*

指向 结构的指针,该结构包含有关要注册的事件的信息。

[out] eventId

类型: EVENTID*

接收事件标识符。 有关事件 ID 的列表,请参阅 事件标识符

返回值

类型: HRESULT

如果该方法成功,则返回 S_OK。 否则,将返回 HRESULT 错误代码。

注解

事件 ID 可用于各种事件方法,并用作 IAccessibleEx 实现中事件的 WinEvent 值。

要求

要求
最低受支持的客户端 Windows 7、带 SP2 的 Windows Vista 和适用于 Windows Vista 的平台更新、带 SP3 的 Windows XP 和适用于 Windows Vista 的平台更新 [桌面应用 |UWP 应用]
最低受支持的服务器 Windows Server 2008 R2、Windows Server 2008 SP2 和 Platform Update for Windows Server 2008、Windows Server 2003 SP2 和 Platform Update for Windows Server 2008 [桌面应用 |UWP 应用]
目标平台 Windows
标头 uiautomationcore.h (包括 UIAutomation.h)

另请参阅

IUIAutomationRegistrar