This topic has not yet been rated - Rate this topic

WinHttpResetAutoProxy function

The WinHttpResetAutoProxy function resets the auto-proxy.

Syntax


DWORD WinHttpResetAutoProxy(
  _In_  HINTERNET hSession,
  _In_  DWORD dwFlags
);

Parameters

hSession [in]

Valid HINTERNET WinHTTP session handle returned by a previous call to WinHttpOpen.

dwFlags [in]

A set of flags that affects the reset operation.

The following flags are supported.

ValueMeaning
WINHTTP_RESET_SCRIPT_CACHE

Flushes persistent HTTP cache of proxy scripts.

WINHTTP_WRAPPER_RESET_STATE

Forces a flush and retry of non-persistent proxy information on the current network.

NHTTP_RESET_OUT_OF_PROC

Act on the autoproxy service instead of the current process.

Note  This flag is required.

Applications using WinHttpGetProxyForUrl that need 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 codeDescription
ERROR_SUCCESS

The operation was successful.

ERROR_INVALID_HANDLE

hSession is not a valid handle.

ERROR_WINHTTP_INCORRECT_HANDLE TYPE

hSession is not the product of a call to WinHttpOpen.

 

Requirements

Minimum supported client

Windows 8 [desktop apps only]

Minimum supported server

Windows Server 2012 [desktop apps only]

Header

Winhttp.h

Library

Winhttp.lib

DLL

Winhttp.dll

 

 

Send comments about this topic to Microsoft

Build date: 10/26/2012

Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.