WinHttpCreateProxyResolver function (winhttp.h)

The WinHttpCreateProxyResolver function creates a handle for use by WinHttpGetProxyForUrlEx.

Syntax

WINHTTPAPI DWORD WinHttpCreateProxyResolver(
  [in]  HINTERNET hSession,
  [out] HINTERNET *phResolver
);

Parameters

[in] hSession

Valid HINTERNET WinHTTP session handle returned by a previous call to WinHttpOpen. The session handle must be opened using WINHTTP_FLAG_ASYNC.

[out] phResolver

A pointer to a new handle for use by WinHttpGetProxyForUrlEx. When finished or cancelling an outstanding operation, close this handle with WinHttpCloseHandle.

Return value

A status code indicating the result of the operation.

The following codes may be returned. Description
ERROR_SUCCESS
The operation succeeded.
ERROR_INVALID_HANDLE
hSession is NULL.
ERROR_WINHTTP_INCORRECT_HANDLE_TYPE
hSession is not the result of a call to WinHttpOpen or hSession is not marked as asynchronous using WINHTTP_FLAG_ASYNC.

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