IConditionFactory::MakeNot method (structuredquery.h)

Creates a condition node that is a logical negation (NOT) of another condition (a subnode of this node).

Syntax

HRESULT MakeNot(
  [in]          ICondition *pcSub,
  [in]          BOOL       fSimplify,
  [out, retval] ICondition **ppcResult
);

Parameters

[in] pcSub

Type: ICondition*

Pointer to the ICondition subnode to be negated.

[in] fSimplify

Type: BOOL

TRUE to logically simplify the result if possible; FALSE otherwise. In a query builder scenario, fSimplify should typically be set to VARIANT_FALSE.

[out, retval] ppcResult

Type: ICondition**

Receives 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

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.

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

CONDITION_OPERATION

CONDITION_TYPE

ICondition

ICondition2

IConditionFactory

IConditionFactory2

Reference