Export (0) Print
Expand All

IConditionFactory::MakeNot method

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

pcSub [in]

Type: ICondition*

Pointer to the ICondition subnode to be negated.

fSimplify [in]

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.

ppcResult [out, retval]

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

Minimum supported client

Windows XP with SP2, Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2003 with SP1 [desktop apps only]

Redistributable

Windows Desktop Search (WDS) 3.0

Header

Structuredquery.h

IDL

Structuredquery.idl

See also

Reference
IConditionFactory
CONDITION_TYPE
CONDITION_OPERATION
IConditionFactory2
ICondition
ICondition2

 

 

Community Additions

ADD
Show:
© 2015 Microsoft