ISearchQueryHelper::get_QuerySorting Method

Gets the sort order for the query result set.

Syntax

HRESULT get_QuerySorting(      
    LPWSTR *ppszSorting
);

Parameters

  • ppszSorting
    [out, retval] Receives a pointer to a comma-delimited, null-terminated Unicode string representing the sort order.

Return Value

Returns S_OK if successful, or an error value otherwise.

Remarks

Windows Search SQL supports sorting on multiple properties, in either ascending (ASC) or descending (DESC) order on each property. For example, the value pointed to by ppszSorting might contain the following:

System.ItemAuthors ASC, System.ItemDate DESC

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_QuerySorting