次の方法で共有


ISearchDesktop::ExecuteQuery method

[Windows Search 2.x is available for use in the operating system specified in the Requirements section. It might be altered or unavailable in later versions. Use the Windows Search API instead.]

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.

Syntax

HRESULT ExecuteQuery(
  [in]  LPCWSTR lpcwstrQuery,
  [in]  LPCWSTR lpcwstrColumn,
  [in]  LPCWSTR lpcwstrRestriction,
  [in]  LPCWSTR lpcwstrSort,
  [out] ppiRs   **ppiRs
);

Parameters

  • lpcwstrQuery [in]
    Type: LPCWSTR

    A string containing the query paramters.

  • lpcwstrColumn [in]
    Type: LPCWSTR

    A string containing the columns to include in query.

  • lpcwstrRestriction [in]
    Type: LPCWSTR

    Restrictions similar to a where clause of a SQL string.

  • lpcwstrSort [in]
    Type: LPCWSTR

    Columns to sort results by.

  • ppiRs [out]
    Type: ppiRs**

    When this method returns successfully, contains a pointer to the address of recordset returned from the query.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks