ISearchQueryHelper::get_QuerySyntax Method

Gets the syntax of the query.

Syntax

HRESULT get_QuerySyntax(      
    SEARCH_QUERY_SYNTAX *pQuerySyntax
);

Parameters

  • pQuerySyntax
    [out, retval] Receives a pointer to a value from the SEARCH_QUERY_SYNTAX enumeration.

Return Value

Returns S_OK if successful, or an error value otherwise.

Remarks

The allowed syntaxes are Simple, Natural Query Syntax (NQS), and Advanced Query Syntax (AQS). If not set, the default query syntax is SEARCH_ADVANCED_QUERY_SYNTAX.

The DSearch code sample, available on Code Gallery and the Windows 7 SDK, demonstrates how to create a class for a static console application to query Windows Search using the Microsoft.Search.Interop assembly for ISearchQueryHelper.

See Also

ISearchQueryHelper::put_QuerySyntax