Share via


ISearchManager::SetProxy Method

Stores information in the indexer that determines how the indexer will work and communicate with a proxy server.

Syntax

HRESULT SetProxy(      
    PROXY_ACCESS sUseProxy,
    BOOL fLocalByPassProxy,
    DWORD dwPortNumber,
    LPCWSTR pszProxyName,
    LPCWSTR pszBypassList
);

Parameters

  • sUseProxy
    [in] Sets whether and how to use a proxy, using one of the values enumerated in PROXY_ACCESS.
  • fLocalByPassProxy
    [in] Sets whether the proxy server should be bypassed for local items and URLs.
  • dwPortNumber
    [in] Sets the port number that the index will use to talk to the proxy server.
  • pszProxyName
    [in] A null-terminated Unicode string containing the name of the proxy server to use.
  • pszBypassList
    [in] A null-terminated Unicode string containing a comma-delimited list of items that are considered local by the indexer and are not to be accessed through a proxy server.

Return Value

Returns S_OK if successful, or an error value otherwise.

Remarks

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