IUIAutomationElement::GetCachedPropertyValue 方法 (uiautomationclient.h)

從這個 UI 自動化專案的快取中擷取屬性值。

語法

HRESULT GetCachedPropertyValue(
  [in]          PROPERTYID propertyId,
  [out, retval] VARIANT    *retVal
);

參數

[in] propertyId

類型: PROPERTYID

屬性的識別碼。 如需屬性識別碼的清單,請參閱 屬性識別碼

[out, retval] retVal

類型: VARIANT*

接收快取屬性的值。

傳回值

類型: HRESULT

如果此方法成功,則會傳回 S_OK。 否則,它會傳回 HRESULT 錯誤碼。

備註

雙精度浮點數類型的 Microsoft UI 自動化屬性支援 「數位」 (NaN) 值。 擷取 雙精度浮 點類型的屬性時,用戶端可以使用 _isnan 函式來判斷屬性是否為 NaN 值。

規格需求

   
最低支援的用戶端 Windows 7、Windows Vista sp2 和 Platform Update for Windows Vista、Windows XP with SP3 和 Platform Update for Windows Vista [僅限桌面應用程式]
最低支援的伺服器 Windows Server 2008 R2、Windows Server 2008 SP2 和 Platform Update for Windows Server 2008、Windows Server 2003 SP2 和 Platform Update for Windows Server 2008 [僅限桌面應用程式]
目標平台 Windows
標頭 uiautomationclient.h (包含 UIAutomation.h)

另請參閱

概念

GetCachedPropertyValueEx

GetCurrentPropertyValue

IUIAutomationElement

參考

UI 自動化屬性概觀