Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

CITextToFullTreeEx 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.]

Creates a full command tree using the Query Language Dialect that you specify.


HRESULT __stdcall CITextToFullTreeEx(
  const WCHAR *pwszRestriction,
  ULONG ulDialect,
  const WCHAR *pwszColumns,
  const WCHAR *pwszSortColumns,
  const WCHAR *pwszGroupings,
  ULONG cProperties,
  CIPROPERTYDEF *pProperties,
  LCID LocaleID



A pointer to a null-terminated string that specifies an Indexing Service query. The syntax for queries is described in Query Languages for Indexing Service.


A value from ISQLANG_* constants that specifies a specific version of the Indexing Service query language to be used.


A pointer to a null-terminated string that specifies a comma-separated list of column names returned in the query results. These columns can be bound by OLE DB accessors.


A pointer to a null-terminated string that contains a comma-separated list of column names that specify the sort order for the query results. A sort direction can be appended to each column name. Use [d] for descending, and [a] for ascending. If no sort order is specified, ascending is the default. Can be NULL for no sort order.


A pointer to a null-terminated string that contains a grouping specification made up of a type (currently only [unique] is supported), a property name, and a sort order ([a] for ascending or [d] for descending). In a unique grouping, unique values of the column set form the individual categories. This parameter is optional.

The syntax for the unique grouping term is:

unique fname [ {[a]|[d]} ] [ , fname2 {[a]|[d]} ... ]

where fname and fname2 are the assigned friendly names.

Column names separated by a plus sign (+) are grouped in individual categories, and column names following a comma (,) are grouped together into subgroups of the preceding grouping.


A pointer to the address of the location to receive the DBCOMMANDTREE structure for the command tree.


The number of properties in the pProperties array, or zero if pProperties is NULL.


A pointer to an array of properties that can be referred to by a friendly name in the pwszColumns, pwszSortColumns, pwszGroupings, and pwszRestriction parameters. Column names in the wcsFriendlyName member of each CIPROPERTYDEF structure must be specified in uppercase. This parameter can be NULL if no properties are being defined and cProperties is zero. Indexing Service's built-in properties do not need to be defined to be used. It is an error to define a property with the same friendly name as that of a built-in property.


The locale identifier (LCID) used for nodes in ppTree that contain an LCID member, including nodes such as content restrictions, sort order, and other locale properties.

Return value

This function can return one of these values.

Return codeDescription

The operation was completed successfully.


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


The function received an invalid parameter.


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


An unknown error has occurred.



The query tree allocated by the CITextToFullTreeEx function must be freed either with the ICommandTree::FreeCommandTree method or passed to the ICommandTree::SetCommandTree method with the fCopy parameter set to FALSE.

Be sure to include the following #define directive before your #include <oledberr.h> to access the command tree definitions.

#include <oledberr.h> 
#include <oledb.h> 
#include <cmdtree.h>


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







See also




Build date: 9/10/2012

Community Additions

© 2015 Microsoft