IConditionFactory::MakeAndOr method (structuredquery.h)
Creates a condition node that is a logical conjunction (AND) or disjunction (OR) of a collection of subconditions.
Syntax
HRESULT MakeAndOr(
[in] CONDITION_TYPE ct,
[in] IEnumUnknown *peuSubs,
[in] BOOL fSimplify,
[out, retval] ICondition **ppcResult
);
Parameters
[in] ct
Type: CONDITION_TYPE
The CONDITION_TYPE of the condition node. The CONDITION_TYPE must be either CT_AND_CONDITION or CT_OR_CONDITION.
[in] peuSubs
Type: IEnumUnknown*
A pointer to an enumeration of ICondition objects, or NULL for an empty enumeration.
[in] fSimplify
Type: BOOL
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.
[out, retval] ppcResult
Type: ICondition**
Receives the address of a pointer to the new ICondition node.
Return value
Type: HRESULT
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
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.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows XP with SP2, Windows Vista [desktop apps only] |
Minimum supported server | Windows Server 2003 with SP1 [desktop apps only] |
Target Platform | Windows |
Header | structuredquery.h |
Redistributable | Windows Desktop Search (WDS) 3.0 |
See also
Reference