IConditionFactory::MakeNot Method
Creates a condition node that is a logical negation (NOT) of another condition (a subnode of this node).
Syntax
HRESULT MakeNot( ICondition *pcSub, BOOL fSimplify, ICondition **ppcResult );
Parameters
- pcSub
[in] Pointer to the ICondition subnode to be negated.- fSimplify
[in] TRUE to logically simplify the result if possible; FALSE otherwise. In a query builder scenario, fSimplify should typically be set to VARIANT_FALSE.- ppcResult
[out, retval] Receives a pointer to the new ICondition node.
Return Value
Returns S_OK if successful, or an error value otherwise.
Remarks
Logically simplifying a condition node usually results in a smaller, more easily traversed and processed condition tree. For example, if pcSub is itself a negation condition with a subcondition C, then the double negation is logically resolved, and ppcResult is set to C. Without simplification, the resulting tree would look like NOT — NOT — C.
Applications that need to execute queries based on the condition tree would typically benefit from setting this parameter to TRUE.
See Also
IConditionFactory, CONDITION_TYPE, CONDITION_OPERATION, IConditionFactory2, ICondition, ICondition2