ISearchQueryHelper::put_QueryWhereRestrictions Method
Sets the restrictions appended to a query in WHERE clauses.
Syntax
HRESULT put_QueryWhereRestrictions( LPCWSTR pszRestrictions );
Parameters
- pszRestrictions
[in, unique] Pointer to a comma-delimited null-terminated Unicode string that specifies one or more query restrictions appended to the query in generated WHERE clause.
Return Value
Returns S_OK if successful, or an error value otherwise.
Remarks
pszRestrictions must be a valid WHERE clause for Windows Search SQL (without the WHERE keyword).
When you create pszRestrictions with multiple restrictions, additional "WHERE" clauses concatenated to the first must start with "AND" or "OR". For example: "and contains(*, 'qqq')"
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_QueryWhereRestrictions, Overview of Windows Search SQL