[PATCH 1/1] wininet: Return INTERNET_RAS_INSTALLED flag from InternetGetConnectedStateExW().

Paul Gofman wine at gitlab.winehq.org
Fri May 27 17:25:02 CDT 2022


From: Paul Gofman <pgofman at codeweavers.com>

Signed-off-by: Paul Gofman <pgofman at codeweavers.com>
---
 dlls/wininet/internet.c       | 4 ++--
 dlls/wininet/tests/internet.c | 2 --
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/dlls/wininet/internet.c b/dlls/wininet/internet.c
index 4d512e4ef39..120cc9af4cc 100644
--- a/dlls/wininet/internet.c
+++ b/dlls/wininet/internet.c
@@ -1213,8 +1213,8 @@ BOOL WINAPI InternetGetConnectedStateExW(LPDWORD lpdwStatus, LPWSTR lpszConnecti
         return FALSE;
 
     if (lpdwStatus) {
-        WARN("always returning LAN connection.\n");
-        *lpdwStatus = INTERNET_CONNECTION_LAN;
+        WARN("always returning LAN connection and RAS installed.\n");
+        *lpdwStatus = INTERNET_CONNECTION_LAN | INTERNET_RAS_INSTALLED;
     }
 
     /* When the buffer size is zero LoadStringW fills the buffer with a pointer to
diff --git a/dlls/wininet/tests/internet.c b/dlls/wininet/tests/internet.c
index 5083596f9df..97bd36f9427 100644
--- a/dlls/wininet/tests/internet.c
+++ b/dlls/wininet/tests/internet.c
@@ -1632,7 +1632,6 @@ static void test_InternetGetConnectedStateExA(void)
     buffer[0] = 0;
     res = pInternetGetConnectedStateExA(&flags, buffer, sizeof(buffer), 0);
     trace("Internet Connection: Flags 0x%02lx - Name '%s'\n", flags, buffer);
-    todo_wine
     ok (flags & INTERNET_RAS_INSTALLED, "Missing RAS flag\n");
     if(!res) {
         win_skip("InternetGetConnectedStateExA tests require a valid connection\n");
@@ -1734,7 +1733,6 @@ static void test_InternetGetConnectedStateExW(void)
     buffer[0] = 0;
     res = pInternetGetConnectedStateExW(&flags, buffer, ARRAY_SIZE(buffer), 0);
     trace("Internet Connection: Flags 0x%02lx - Name '%s'\n", flags, wine_dbgstr_w(buffer));
-    todo_wine
     ok (flags & INTERNET_RAS_INSTALLED, "Missing RAS flag\n");
     if(!res) {
         win_skip("InternetGetConnectedStateExW tests require a valid connection\n");
-- 
GitLab

https://gitlab.winehq.org/wine/wine/-/merge_requests/144



More information about the wine-devel mailing list