wininet: Add stub for INTERNET_OPTION_REFRESH.

Based on patch by Michael Müller.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2018-05-03 17:14:36 +02:00 committed by Alexandre Julliard
parent d9dd9023fd
commit 2bba45765b
2 changed files with 18 additions and 0 deletions

View File

@ -970,6 +970,9 @@ static DWORD APPINFO_SetOption(object_header_t *hdr, DWORD option, void *buf, DW
heap_free(ai->agent);
if (!(ai->agent = heap_strdupW(buf))) return ERROR_OUTOFMEMORY;
return ERROR_SUCCESS;
case INTERNET_OPTION_REFRESH:
FIXME("INTERNET_OPTION_REFRESH\n");
return ERROR_SUCCESS;
}
return INET_SetOption(hdr, option, buf, size);
@ -2611,6 +2614,8 @@ DWORD INET_SetOption(object_header_t *hdr, DWORD option, void *buf, DWORD size)
case INTERNET_OPTION_MAX_CONNS_PER_1_0_SERVER:
WARN("Called on global option %u\n", option);
return ERROR_INTERNET_INVALID_OPERATION;
case INTERNET_OPTION_REFRESH:
return ERROR_INTERNET_INCORRECT_HANDLE_TYPE;
}
return ERROR_INTERNET_INVALID_OPTION;

View File

@ -1174,6 +1174,19 @@ static void test_InternetSetOption(void)
ret = InternetSetOptionA(ses, INTERNET_OPTION_SETTINGS_CHANGED, NULL, 0);
ok(ret == TRUE, "InternetSetOption should've succeeded\n");
ret = InternetSetOptionA(ses, INTERNET_OPTION_REFRESH, NULL, 0);
ok(ret == TRUE, "InternetSetOption should've succeeded\n");
SetLastError(0xdeadbeef);
ret = InternetSetOptionA(req, INTERNET_OPTION_REFRESH, NULL, 0);
ok(ret == FALSE, "InternetSetOption should've failed\n");
ok(GetLastError() == ERROR_INTERNET_INCORRECT_HANDLE_TYPE, "GetLastError() = %u\n", GetLastError());
SetLastError(0xdeadbeef);
ret = InternetSetOptionA(con, INTERNET_OPTION_REFRESH, NULL, 0);
ok(ret == FALSE, "InternetSetOption should've failed\n");
ok(GetLastError() == ERROR_INTERNET_INCORRECT_HANDLE_TYPE, "GetLastError() = %u\n", GetLastError());
ret = InternetCloseHandle(req);
ok(ret == TRUE, "InternetCloseHandle failed: 0x%08x\n", GetLastError());
ret = InternetCloseHandle(con);