IUIAutomationElement7::FindAllWithOptionsBuildCache 方法 (uiautomationclient.h)

依指定的順序尋找所有相符的專案,但也會快取其屬性和模式。

語法

HRESULT FindAllWithOptionsBuildCache(
  [in]          TreeScope                 scope,
  [in]          IUIAutomationCondition    *condition,
  [in]          IUIAutomationCacheRequest *cacheRequest,
  [in]          TreeTraversalOptions      traversalOptions,
  [in]          IUIAutomationElement      *root,
  [out, retval] IUIAutomationElementArray **found
);

參數

[in] scope

類型: TreeScope

要求的範圍。

擷取專案時,只能針對專案本身執行快取 (默認行為) ,或針對專案及其子系或子系執行快取。 此屬性描述要求的範圍。

[in] condition

類型: IUIAutomationCondition

在搜尋 使用者介面自動化 樹狀結構中的元素時,用於篩選條件的主要介面。

[in] cacheRequest

類型: IUIAutomationCacheRequest

快取要求的指標,指定要包含在快取中的控件模式和屬性。

[in] traversalOptions

類型: TreeTraversalOptions

樹狀目錄導覽順序。

[in] root

類型: IUIAutomationElement

要開始搜尋之專案的指標。

[out, retval] found

接收相符項目的陣列指標。 如果找不到相符的專案,則傳回空陣列。

傳回值

如果成功 則傳回S_OK,否則傳回 HRESULT 錯誤碼。

規格需求

需求
最低支援的用戶端 Windows 10 版本 1703 [僅限傳統型應用程式]
最低支援的伺服器 Windows Server 2016 [僅限傳統型應用程式]
目標平台 Windows
標頭 uiautomationclient.h (包含 UIAutomation.h)
Dll UIAutomationCore.dll

另請參閱

IUIAutomationElement7