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.
This commit is contained in:
Benjamin Cutler 2005-04-14 11:31:39 +00:00 committed by Alexandre Julliard
parent a6659d26d2
commit 8c37f4362b

View File

@ -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)