IConditionFactory::MakeAndOr Method
Creates a condition node that is a logical conjunction ("AND") or disjunction ("OR") of a collection of subconditions.
Syntax
HRESULT MakeAndOr( CONDITION_TYPE nodeType, IEnumUnknown *pSubConditions, BOOL simplify, ICondition **ppResultQuery );
Parameters
nodeType
[in] The CONDITION_TYPE of the condition node. Must be either CT_AND_CONDITION or CT_OR_CONDITION.pSubConditions
[in] Pointer to an enumeration of ICondition objects or NULL for an empty enumeration.simplify
[in] TRUE to logically simplify the result, if possible; then the result will not necessarily to be of the specified kind. FALSE if the result should have exactly the prescribed structure.An application that plans to execute a query based on the condition tree would typically benefit from setting this parameter to TRUE.
ppResultQuery
[out, retval] Returns the address of a pointer to the new ICondition node.
Return Value
Returns S_OK if successful, or an error value otherwise.
Remarks
There are no special condition trees for TRUE and FALSE. However, a condition tree consisting of an AND node with no subconditions is always TRUE, and a condition tree consisting of an OR node with no subconditions is always FALSE.