Share via


IUIAutomation::CreateAndConditionFromArray 方法 (uiautomationclient.h)

建立條件,根據多個條件選取專案,所有條件都必須為 true。

語法

HRESULT CreateAndConditionFromArray(
  [in]          SAFEARRAY              *conditions,
  [out, retval] IUIAutomationCondition **newCondition
);

參數

[in] conditions

類型: SAFEARRAY*

要結合之條件的指標。

[out, retval] newCondition

類型: IUIAutomationCondition**

接收合併條件的指標。

傳回值

類型: HRESULT

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

備註

這個方法會在條件陣列中的每個指標上呼叫 AddRef。 這表示您可以在呼叫 CreateAndConditionFromArray 之後,在這些指標上呼叫 Release,而不會使 CreateAndConditionFromArray 傳回的指標失效。 當您在 CreateAndConditionFromArray 傳回的指標上呼叫 Release 時,使用者介面自動化 在條件數位中的每個指標上呼叫 Release

規格需求

需求
最低支援的用戶端 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)

另請參閱

使用安全數位的最佳做法

概念

CreateAndCondition

CreateAndConditionFromNativeArray

FindAll

FindAllBuildCache

FindFirst

FindFirstBuildCache

IUIAutomation

IUIAutomationCondition

參考