winhttp: Fix a crash on Vista and higher.

This commit is contained in:
Paul Vriens 2009-07-16 15:47:38 +02:00 committed by Alexandre Julliard
parent d2117c14ba
commit 4e370f74f7
1 changed files with 8 additions and 4 deletions

View File

@ -905,10 +905,14 @@ static void test_set_default_proxy_config(void)
len = get_default_proxy_reg_value( saved_proxy_settings, len, &type );
}
SetLastError(0xdeadbeef);
ret = WinHttpSetDefaultProxyConfiguration(NULL);
ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER,
"expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
if (0)
{
/* Crashes on Vista and higher */
SetLastError(0xdeadbeef);
ret = WinHttpSetDefaultProxyConfiguration(NULL);
ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER,
"expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
}
/* test with invalid access type */
info.dwAccessType = 0xdeadbeef;