Share via


ISearchManager::put_UserAgent Method

Sets the user agent string that a user agent passes to Web site and services to identify itself.

Syntax

HRESULT put_UserAgent(      
    LPCWSTR pszUserAgent
);

Parameters

  • pszUserAgent
    [in]  The user agent string identifying the user agent.

Return Value

Returns S_OK if successful, or an error value otherwise.

Remarks

A user agent is a client application that accesses the Internet. User agents include Web browsers, search engine crawlers, download managers, and so on, and may be associated with a specific protocol such as File Transfer Protocol (FTP) or Hyper Text Transfer Protocol (HTTP).

Each user agent typially has a user agent string, such as "Mozilla/4.0", that it can pass to Web sites and services to identify itself.

The ReindexMatchingUrls code sample, available on Code Gallery and the Windows 7 SDK, demonstrates ways to specify which files to re-index and how.