Microsoft XML Core Services (MSXML) 5.0 for Microsoft Office - DOM Reference

setProxy Method (ServerXMLHTTP/IServerXMLHTTPRequest)

Specify proxy configuration.

[Script]

Script Syntax

oSrvXMLHTTPRequest.setProxy(proxySetting, varProxyServer, varBypassList);

Parameters

proxySetting
The proxy configuration whose value is to be set. For a list of available settings and a description of how to use those settings, see Remarks.
varProxyServer
The name of a proxy server or a list of proxy server names.
varBypassList
The list of locally known host names or IP addresses for which you want to permit bypass of the proxy server.

Example

No examples available at this time.

[Visual Basic]

Visual Basic Syntax

oSrvXMLHTTPRequest.setProxy(proxySetting, varProxyServer, varBypassList)

Parameters

proxySetting
The proxy configuration whose value is to be set. For a list of available settings and a description of how to use those settings, see Remarks.
varProxyServer
The name of a proxy server or a list of proxy server names.
varBypassList
The list of locally known host names or IP addresses for which you want to permit bypass of the proxy server.
[C/C++]

C/C++ Syntax

HRESULT setProxy(
    SXH_PROXY_SETTING proxySetting,
    VARIANT varProxyServer,
    VARIANT varBypassList);

Parameters

proxySetting [in]
The proxy configuration whose value is to be set. For a list of available settings and a description of how to use those settings, see Remarks.
varProxyServer [in, optional]
The name of a proxy server or a list of proxy server names.
varBypassList [in, optional]
The list of locally known host names or IP addresses for which you want to permit bypass of the proxy server.

C/C++ Return Values

S_OK
Value returned if successful.
E_FAIL
Value returned if name or value is invalid.

Remarks

The following table lists the settings available for use with the setProxy method.

Setting Description
0 SXH_PROXY_SET_PRECONFIG

- or -

SXH_PROXY_SET_DEFAULT

The SXH_PROXY_SET_PRECONFIG option can be used to specify that a previously established static proxy configuration should be used. When this option is used, the configuration is taken from the Windows registry. This is the case if you used the WinHTTP proxy configuration utility, proxycfg.exe, to set proxy settings at the client computer.

Currently, the SXH_PROXY_SET_DEFAULT shares the same settings level as SXH_PROXY_SET_PRECONFIG. It is intended, however, to support auto-proxy configuration features that might be included with future released products.

1 SXH_PROXY_SET_DIRECT

The SXH_PROXY_SET_DIRECT option can be used to specify that all HTTP and HTTPS servers should be accessed directly.

2 SXH_PROXY_SET_PROXY

The SXH_PROXY_SET_PROXY option can be used to specify one or more proxy servers, and an optional bypass list. If a proxy is not specified for a given protocol, and the server is not in the bypass list, the server cannot be accessed.

To view reference information for Visual Basic, C/C++, or Script only, click the Language Filter button Language Filter in the upper-left corner of the page.

See Also

setProxyCredentials Method

Applies to: IServerXMLHTTPRequest /ServerXMLHTTP Members