IUIAutomationTextRange3::GetAttributeValues 方法 (uiautomationclient.h)

返回单个跨进程调用中某个文本范围的所有请求的文本属性值。 这等效于调用 GetAttributeValue,只不过它可以检索多个值,而不仅仅是一个值。

语法

HRESULT GetAttributeValues(
  [in]          const TEXTATTRIBUTEID *attributeIds,
  [in]          int                   attributeIdCount,
  [out, retval] SAFEARRAY             **attributeValues
);

参数

[in] attributeIds

文本属性标识符的列表。

[in] attributeIdCount

attributeIds 列表中的文本属性标识符数。

[out, retval] attributeValues

VARIANTSAFEARRAY,其中包含文本范围的相应文本属性的值。

返回值

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

注解

GetAttributeValues 仅获取调用中提供的文本属性。

要求

   
最低受支持的客户端 Windows 10版本 1703 [仅限桌面应用]
最低受支持的服务器 Windows Server 2016 [仅限桌面应用]
目标平台 Windows
标头 uiautomationclient.h (包括 UIAutomation.h)

另请参阅

IUIAutomationTextRange3

UI 自动化对文本内容的支持