CIBuildQueryNode function

[Indexing Service is no longer supported as of Windows XP and is unavailable for use as of Windows 8. Instead, use Windows Search for client side search and Microsoft Search Server Express for server side search.]

Builds one node of a query restriction tree for a Command object.

Syntax


HRESULT __stdcall CIBuildQueryNode(
   const WCHAR         *wcsProperty,
         DBCOMMANDOP   dbOperator,
   const PROPVARIANT   *pvarPropertyValue,
         DBCOMMANDTREE **ppTree,
         ULONG         cProperties,
   const CIPROPERTYDEF *pProperty,
         LCID          LocaleID
);

Parameters

wcsProperty

A pointer to a null-terminated string that specifies the friendly name for a property. The friendly name can be used in an Indexing Service query, column list, or sort order.

dbOperator

The operation to be performed on the node. See DBCOMMANDOP.

pvarPropertyValue

A pointer to the PROPVARIANT structure for the value to use for the wcsProperty parameter.

ppTree

A pointer to an output variable that receives the pointer to the DBCOMMANDTREE structure for the node created by this function.

cProperties

The number of properties in the pProperty array.

pProperty

A pointer to an array of CIPROPERTYDEF structures, each of which describes a property that can be referred to by a friendly name. This array is populated when pvarPropertyValue contains a string that contains references to properties. This parameter can be NULL when cProperties equals zero.

LocaleID

The locale ID used when converting properties. The pvarPropertyValue parameter itself contains a string that contains references to friendly property names, which are converted to uppercase for comparison and efficiency purposes.

Return value

This function can return one of these values.

Return codeDescription
S_OK

The operation was completed successfully.

QPARSE_E_NO_SUCH_PROPERTY

The function failed because the property name specified by wcsProperty was not found.

E_HANDLE

The function encountered an invalid handle, probably due to a low-memory situation.

E_INVALIDARG

The function received an invalid parameter.

E_OUTOFMEMORY

The function did not have sufficient memory or other resources to complete the operation.

E_FAIL

An unknown error has occurred.

 

Remarks

Use nodes created by the CIBuildQueryNode function to create or add to a query tree using the CIBuildQueryTree function. Content properties are in turn passed to the CITextToSelectTree function to create the SELECT part of the full tree.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

End of client support

Windows 7

End of server support

Windows Server 2008 R2

Header

Ntquery.h

Library

Ntquery.lib

DLL

Ntquery.dll

See also

CIBuildQueryTree
CITextToFullTree
CITextToFullTreeEx
CITextToSelectTree
CITextToSelectTreeEx
DBCOMMANDOP
DBCOMMANDTREE

 

 

Show: