CWinHttpRequest.SetProxymethod
Sets proxy server information.
Syntax
FUNCTION SetProxy (BYVAL ProxySetting AS HTTPREQUEST_PROXY_SETTING, BYREF dvProxyServer AS DVARIANT = "", BYVAL dvBypassList AS DVARIANT = "") AS HRESULT
Parameters
| Name | Description | |
|---|---|---|
ProxySetting | A value of type LONG that receives the flags that control this method. Can be one of the values in the table below. | |
dvProxyServer | Optional. A value of type Variant that is set to a proxy server string when ProxySetting equals HTTPREQUEST_PROXYSETTING_PROXY. | |
dvBypassList | Optional. A value of type Variant that is set to a domain bypass list string when ProxySetting equals HTTPREQUEST_PROXYSETTING_PROXY. |
Return value
Returns S_OK (0) if successful or an error value otherwise.
Description
Sets proxy server information.
Remarks
Enables the calling application to specify use of default proxy information (configured by the proxy configuration tool) or to override Proxycfg.exe. This method must be called before calling the Send method. If this method is called after the Send method, it has no effect.
CWinHttpRequest passes these parameters to Microsoft Windows HTTP Services (WinHTTP).
Reference
- Defined in AfxNova/CWinHttpRequest.inc:364
- Documented in COM/CWinHttpRequest Class.md
- Topic: CWinHttpRequest Class