IUIAutomationPatternInstance::GetProperty 方法 (uiautomationcore.h)

用戶端包裝函式物件會呼叫此函式,依索引指定屬性,以實作 IUIAutomation::get_CurrentXIUIAutomationElement::get_CachedX 方法。

語法

HRESULT GetProperty(
  [in]          UINT             index,
  [in]          BOOL             cached,
                UIAutomationType type,
  [out, retval] void             *pPtr
);

參數

[in] index

類型: UINT

屬性的索引。

[in] cached

類型: BOOL

如果應該從快取擷取屬性,則為TRUE,否則為 FALSE

type

[out, retval] pPtr

類型: void*

接收 屬性的值。

傳回值

類型: HRESULT

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

規格需求

需求
最低支援的用戶端 Windows 7、Windows Vista SP2 和 Windows Vista 平臺更新、Windows XP SP3 和適用於 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)

另請參閱

IUIAutomationPatternInstance