ISearchManager::SetProxy method (searchapi.h)

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

Syntax

HRESULT SetProxy(
  [in] PROXY_ACCESS sUseProxy,
  [in] BOOL         fLocalByPassProxy,
  [in] DWORD        dwPortNumber,
  [in] LPCWSTR      pszProxyName,
  [in] LPCWSTR      pszByPassList
);

Parameters

[in] sUseProxy

Type: PROXY_ACCESS

Sets whether and how to use a proxy, using one of the values enumerated in PROXY_ACCESS.

[in] fLocalByPassProxy

Type: BOOL

Sets whether the proxy server should be bypassed for local items and URLs.

[in] dwPortNumber

Type: DWORD

Sets the port number that the index will use to talk to the proxy server.

[in] pszProxyName

Type: LPCWSTR

A null-terminated Unicode string containing the name of the proxy server to use.

[in] pszByPassList

Type: LPCWSTR

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

Type: HRESULT

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

Remarks

Check out the ReindexMatchingUrls code sample to see ways to specify which files to re-index and how set it up.

Requirements

Requirement Value
Minimum supported client Windows XP with SP2, Windows Vista [desktop apps only]
Minimum supported server Windows Server 2003 with SP1 [desktop apps only]
Target Platform Windows
Header searchapi.h
Redistributable Windows Desktop Search (WDS) 3.0