IConditionFactory2::CreateCompoundFromArray method (structuredquery.h)

Creates a leaf condition node that is a conjunction (AND) or a disjunction (OR) from an array of condition nodes. The returned object supports ICondition and ICondition2.

Syntax

HRESULT CreateCompoundFromArray(
  [in]  CONDITION_TYPE             ct,
  [in]  ICondition                 **ppcondSubs,
  [in]  ULONG                      cSubs,
  [in]  CONDITION_CREATION_OPTIONS cco,
  [in]  REFIID                     riid,
  [out] void                       **ppv
);

Parameters

[in] ct

Type: CONDITION_TYPE

A CONDITION_TYPE enumeration that must be set to either the CT_AND_CONDITION or CT_OR_CONDITION flag.

[in] ppcondSubs

Type: ICondition**

Each element of the ppCondSubs parameter must implement ICondition.

[in] cSubs

Type: ULONG

The leaf subcondition as an unsigned 64-bit integer value.

[in] cco

Type: CONDITION_CREATION_OPTIONS

The condition creation operation of the leaf condition as the CONDITION_CREATION_OPTIONS enumeration.

[in] riid

Type: REFIID

The desired IID of the enumerating interface: either IEnumUnknown, IID_IEnumVARIANT, or (for a negation condition) IID_ICondition.

[out] ppv

Type: void**

A collection of zero or more ICondition and ICondition2 objects.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

For default options, use the CONDITION_CREATION_DEFAULT flag.

Requirements

Requirement Value
Minimum supported client Windows 7 [desktop apps only]
Minimum supported server Windows Server 2008 R2 [desktop apps only]
Target Platform Windows
Header structuredquery.h

See also

CONDITION_CREATION_OPTIONS

CONDITION_OPERATION

CONDITION_TYPE

ICondition

ICondition2

IConditionFactory

IConditionFactory2

Reference