Commit 8c37f436 authored by Benjamin Cutler's avatar Benjamin Cutler Committed by Alexandre Julliard

Better handling of hInternet == NULL for INTERNET_OPTION_PROXY in

INET_QueryOptionHelper. MSDN says to return 'global proxy info' when hInternet == NULL. Thanks to Juan Lang for helping with this.
parent a6659d26
......@@ -1875,12 +1875,14 @@ static BOOL INET_QueryOptionHelper(BOOL bIsUnicode, HINTERNET hInternet, DWORD d
case INTERNET_OPTION_PROXY:
{
LPWININETAPPINFOW lpwai = (LPWININETAPPINFOW)lpwhh;
WININETAPPINFOW wai;
if (!lpwhh)
if (lpwai == NULL)
{
WARN("Invalid hInternet handle\n");
SetLastError(ERROR_INVALID_HANDLE);
return FALSE;
TRACE("Getting global proxy info\n");
memset(&wai, 0, sizeof(WININETAPPINFOW));
INTERNET_ConfigureProxyFromReg( &wai );
lpwai = &wai;
}
if (bIsUnicode)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment