ISearchQueryHelper::put_QueryMaxResults Method

Sets the maximum number of results to be returned by a query.

Syntax

HRESULT put_QueryMaxResults(      
    LONG cMaxResults
);

Parameters

  • cMaxResults
    [in] The maximum number of results to be returned. Negative numbers return all results.

Return Value

Returns S_OK if successful, or an error value otherwise.

Remarks

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::get_QueryMaxResults