WinHttpResetAutoProxy function (winhttp.h)
The WinHttpResetAutoProxy function resets the auto-proxy.
Syntax
WINHTTPAPI DWORD WinHttpResetAutoProxy(
[in] HINTERNET hSession,
[in] DWORD dwFlags
);
Parameters
[in] hSession
A valid HINTERNET WinHTTP session handle returned by a previous call to the WinHttpOpen function.
[in] dwFlags
A set of flags that affects the reset operation.
The following flags are supported as defined in the Winhttp.h header file.
Value | Meaning |
---|---|
|
Forces a flush and retry of non-persistent proxy information on the current network. |
|
Flush the PAD information for the current network. |
|
Flush the PAD information for all networks. |
|
Flush the persistent HTTP cache of proxy scripts. |
|
Forces a flush and retry of all proxy information on the current network. |
|
Flush the current proxy information and notify that the network changed. |
|
Act on the autoproxy service instead of the current process. Note This flag is required.
Applications that use the WinHttpGetProxyForUrl function to purge in-process caching should close the hInternet handle and open a new handle for future calls. |
Return value
A code indicating the success or failure of the operation.
Return code | Description |
---|---|
|
The operation was successful. |
|
The hSession parameter is not a valid handle. |
|
The hSession parameter is not the product of a call to WinHttpOpen. |
Remarks
To reset everything, set the dwFlags parameter to include WINHTTP_RESET_ALL and WINHTTP_RESET_OUT_OF_PROC.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 8 [desktop apps only] |
Minimum supported server | Windows Server 2012 [desktop apps only] |
Target Platform | Windows |
Header | winhttp.h |
Library | Winhttp.lib |
DLL | Winhttp.dll |