[PATCH 2/2] wininet: Add support for INTERNET_OPTION_SETTINGS_CHANGED in InternetSetOption.

Alistair Leslie-Hughes leslie_alistair at hotmail.com
Sun Apr 29 20:00:54 CDT 2018


From: Michael Müller <michael at fds-team.de>

Signed-off-by: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
---
 dlls/wininet/internet.c       | 3 +++
 dlls/wininet/tests/internet.c | 8 ++++++++
 2 files changed, 11 insertions(+)

diff --git a/dlls/wininet/internet.c b/dlls/wininet/internet.c
index c3838e0..a53a8c5 100644
--- a/dlls/wininet/internet.c
+++ b/dlls/wininet/internet.c
@@ -2940,6 +2940,9 @@ BOOL WINAPI InternetSetOptionW(HINTERNET hInternet, DWORD dwOption,
     case INTERNET_OPTION_SETTINGS_CHANGED:
         FIXME("INTERNET_OPTION_SETTINGS_CHANGED; STUB\n");
         break;
+    case INTERNET_OPTION_REFRESH:
+        FIXME("INTERNET_OPTION_REFRESH; STUB\n");
+        break;
     default:
         FIXME("Option %d STUB\n",dwOption);
         SetLastError(ERROR_INTERNET_INVALID_OPTION);
diff --git a/dlls/wininet/tests/internet.c b/dlls/wininet/tests/internet.c
index d9cb720..a6498ce 100644
--- a/dlls/wininet/tests/internet.c
+++ b/dlls/wininet/tests/internet.c
@@ -1171,6 +1171,14 @@ 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);
+    todo_wine ok(ret == FALSE, "InternetSetOption should've failed\n");
+    todo_wine ok(GetLastError() == ERROR_INTERNET_INCORRECT_HANDLE_TYPE, "GetLastError() = %x\n", GetLastError());
+
     ret = InternetCloseHandle(req);
     ok(ret == TRUE, "InternetCloseHandle failed: 0x%08x\n", GetLastError());
     ret = InternetCloseHandle(con);
-- 
1.9.1



More information about the wine-devel mailing list