IUIAutomationRegistrar::RegisterProperty 方法 (uiautomationcore.h)
注册第三方属性。
语法
HRESULT RegisterProperty(
[in] const UIAutomationPropertyInfo *property,
[out] PROPERTYID *propertyId
);
参数
[in] property
指向结构的指针,该结构包含有关要注册的属性的信息。
[out] propertyId
类型: PropertyID*
接收新注册的属性的属性 ID。
返回值
类型: HRESULT
如果该方法成功,则返回 S_OK。 否则,将返回 HRESULT 错误代码。
注解
属性 ID 可用于各种属性方法,包括 GetCurrentPropertyValue 和 CreatePropertyCondition。 同一值可用作 IAccessibleEx 实现中属性更改事件的 WinEvent 值。
要求
要求 | 值 |
---|---|
最低受支持的客户端 | Windows 7、带 Windows Vista SP2 的 Windows Vista 和适用于 Windows Vista 的平台更新、带 SP3 的 Windows XP 和适用于 Windows Vista 的平台更新 [桌面应用 |UWP 应用] |
最低受支持的服务器 | Windows Server 2008 R2、Windows Server 2008 SP2 和适用于 Windows Server 2008 的平台更新、带 SP2 的 Windows Server 2003 和适用于 Windows Server 2008 的平台更新 [桌面应用 |UWP 应用] |
目标平台 | Windows |
标头 | uiautomationcore.h (包括 UIAutomation.h) |