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:
parent
a6659d26d2
commit
8c37f4362b
@ -1875,12 +1875,14 @@ static BOOL INET_QueryOptionHelper(BOOL bIsUnicode, HINTERNET hInternet, DWORD d
|
|||||||
case INTERNET_OPTION_PROXY:
|
case INTERNET_OPTION_PROXY:
|
||||||
{
|
{
|
||||||
LPWININETAPPINFOW lpwai = (LPWININETAPPINFOW)lpwhh;
|
LPWININETAPPINFOW lpwai = (LPWININETAPPINFOW)lpwhh;
|
||||||
|
WININETAPPINFOW wai;
|
||||||
|
|
||||||
if (!lpwhh)
|
if (lpwai == NULL)
|
||||||
{
|
{
|
||||||
WARN("Invalid hInternet handle\n");
|
TRACE("Getting global proxy info\n");
|
||||||
SetLastError(ERROR_INVALID_HANDLE);
|
memset(&wai, 0, sizeof(WININETAPPINFOW));
|
||||||
return FALSE;
|
INTERNET_ConfigureProxyFromReg( &wai );
|
||||||
|
lpwai = &wai;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bIsUnicode)
|
if (bIsUnicode)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user