WinHttpResetAutoProxy function
The WinHttpResetAutoProxy function resets the auto-proxy.
Syntax
DWORD WinHttpResetAutoProxy( _In_ HINTERNET hSession, _In_ DWORD dwFlags );
Parameters
- hSession [in]
-
A valid HINTERNET WinHTTP session handle returned by a previous call to the WinHttpOpen function.
- dwFlags [in]
-
A set of flags that affects the reset operation.
The following flags are supported as defined in the Winhttp.h header file.
Value Meaning - WINHTTP_RESET_STATE
- 0x00000001
Forces a flush and retry of non-persistent proxy information on the current network.
- WINHTTP_RESET_SWPAD_CURRENT_NETWORK
- 0x00000002
Flush the PAD information for the current network.
- WINHTTP_RESET_SWPAD_ALL
- 0x00000004
Flush the PAD information for all networks.
- WINHTTP_RESET_SCRIPT_CACHE
- 0x00000008
Flush the persistent HTTP cache of proxy scripts.
- WINHTTP_RESET_ALL
- 0x0000FFFF
Forces a flush and retry of all proxy information on the current network.
- WINHTTP_RESET_NOTIFY_NETWORK_CHANGED
- 0x00010000
Flush the current proxy information and notify that the network changed.
- WINHTTP_RESET_OUT_OF_PROC
- 0x00020000
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
|
Minimum supported client |
Windows 8 [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows Server 2012 [desktop apps only] |
|
Header |
|
|
Library |
|
|
DLL |
|