WINHTTP_AUTOPROXY_OPTIONS structure
The WINHTTP_AUTOPROXY_OPTIONS structure is used to indicate to the WinHttpGetProxyForURL function whether to specify the URL of the Proxy Auto-Configuration (PAC) file or to automatically locate the URL with DHCP or DNS queries to the network.
Syntax
typedef struct { DWORD dwFlags; DWORD dwAutoDetectFlags; LPCWSTR lpszAutoConfigUrl; LPVOID lpvReserved; DWORD dwReserved; BOOL fAutoLogonIfChallenged; } WINHTTP_AUTOPROXY_OPTIONS;
Members
- dwFlags
-
Mechanisms should be used to obtain the PAC file.
Value Meaning - WINHTTP_AUTOPROXY_AUTO_DETECT
Attempt to automatically discover the URL of the PAC file using both DHCP and DNS queries to the local network.
- WINHTTP_AUTOPROXY_CONFIG_URL
Download the PAC file from the URL specified by lpszAutoConfigUrl in the WINHTTP_AUTOPROXY_OPTIONS structure.
- WINHTTP_AUTOPROXY_NO_CACHE_CLIENT
Disables querying a host to proxy cache of script execution results in the current process.
- WINHTTP_AUTOPROXY_NO_CACHE_SVC
Disables querying a host to proxy cache of script execution results in the autoproxy service.
- WINHTTP_AUTOPROXY_NO_DIRECTACCESS
Disables querying Direct Access proxy settings for this request.
- WINHTTP_AUTOPROXY_RUN_INPROCESS
Executes the Web Proxy Auto-Discovery (WPAD) protocol in-process instead of delegating to an out-of-process WinHTTP AutoProxy Service, if available. This flag must be combined with one of the other flags.
This option has no effect when passed to WinHttpGetProxyForUrlEx.
- WINHTTP_AUTOPROXY_RUN_OUTPROCESS_ONLY
By default, WinHTTP is configured to fall back to auto-discover a proxy in-process. If this fallback behavior is undesirable in the event that an out-of-process discovery fails, it can be disabled using this flag.
This option has no effect when passed to WinHttpGetProxyForUrlEx.
Note This flag is available on Windows Server 2003 only.- WINHTTP_AUTOPROXY_SORT_RESULTS
Orders the proxy results based on a heuristic placing the fastest proxies first.
- dwAutoDetectFlags
-
If dwFlags includes the WINHTTP_AUTOPROXY_AUTO_DETECT flag, then dwAutoDetectFlags specifies what protocols are to be used to locate the PAC file. If both the DHCP and DNS auto detect flags are specified, then DHCP is used first; if no PAC URL is discovered using DHCP, then DNS is used.
If dwFlags does not include the WINHTTP_AUTOPROXY_AUTO_DETECT flag, then dwAutoDetectFlags must be zero.
- lpszAutoConfigUrl
-
If dwFlags includes the WINHTTP_AUTOPROXY_CONFIG_URL flag, the lpszAutoConfigUrl must point to a null-terminated Unicode string that contains the URL of the proxy auto-configuration (PAC) file.
If dwFlags does not include the WINHTTP_AUTOPROXY_CONFIG_URL flag, then lpszAutoConfigUrl must be NULL.
- lpvReserved
-
Reserved for future use; must be NULL.
- dwReserved
-
Reserved for future use; must be zero.
- fAutoLogonIfChallenged
-
Specifies whether the client's domain credentials should be automatically sent in response to an NTLM or Negotiate Authentication challenge when WinHTTP requests the PAC file.
If this flag is TRUE, credentials should automatically be sent in response to an authentication challenge. If this flag is FALSE and authentication is required to download the PAC file, the WinHttpGetProxyForUrl function fails.
Requirements
|
Minimum supported client |
Windows XP, Windows 2000 Professional with SP3 [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows Server 2003, Windows 2000 Server with SP3 [desktop apps only] |
|
Header |
|
See also