Поделиться через


ISearchDesktop interface

[Windows Search 2.x is obsolete after Windows XP. Instead, use the Windows Search API.]

ISearchDesktop exposes two methods for submitting and executing queries. The main difference between the two methods, ExecuteQuery and ExecuteSQLQuery, is that the ExecuteQuery method will generate the Structured Query Language (SQL) query for you based on the string passed. ExecuteSQLQuery requires that you supply a correctly formatted SQL query. If you are collecting random parameters from users such as through a text box, ExecuteQuery is faster and easier to use. Also with ExecuteQuery the user can use Advanced Query Syntax to narrow their search. ExecuteSQLQuery may be an appropriate choice if you have a custom interface with check boxes, drop down menus where you have a specific set of in formation that can be selected to create an SQL query. For more information regarding how to use these two methods, there is a sample written in C# included in the SDK.

Members

The ISearchDesktop interface inherits from the IUnknown interface. ISearchDesktop also has these types of members:

  • Methods

Methods

The ISearchDesktop interface has these methods.

Method Description
ExecuteQuery

This method takes a string using Advanced Query Language and also allows optional parameters for Columns and Sort criteria for the record set to be returned.

ExecuteSQLQuery

Takes a pointer to a string that contains a SQL query and its attributes and returns a pointer to the return set.

 

Requirements

Minimum supported client

Windows XP with SP2 [desktop apps only]

Minimum supported server

Windows Server 2003 with SP1 [desktop apps only]

Redistributable

Windows Desktop Search (WDS) 2.6.5

Header

Searchapi.h