InternetGetConnectedStateExA

Aric Stewart aric at codeweavers.com
Wed Nov 3 09:00:38 CST 2004


Add this function as it is needed by iTunes 4.7

-aric
-------------- next part --------------
Index: dlls/wininet/internet.c
===================================================================
RCS file: /home/wine/wine/dlls/wininet/internet.c,v
retrieving revision 1.100
diff -u -u -w -r1.100 internet.c
--- dlls/wininet/internet.c	23 Sep 2004 22:53:04 -0000	1.100
+++ dlls/wininet/internet.c	3 Nov 2004 13:59:34 -0000
@@ -671,6 +671,33 @@
     return TRUE;
 }
 
+BOOL WINAPI InternetGetConnectedStateExA(LPDWORD lpdwStatus, 
+                LPSTR lpszConnectionName, DWORD dwNameLen, DWORD dwReserved)
+{
+    INT len;
+    LPWSTR lpwszConnectionName = NULL;
+    BOOL rc;
+
+    TRACE("(%p, %s, %ld, 0x%08lx)\n", lpdwStatus, debugstr_a(lpszConnectionName), dwNameLen, dwReserved);
+
+    if (lpszConnectionName)
+    {
+        len = MultiByteToWideChar(CP_ACP, 0, lpszConnectionName, -1, NULL, 0);
+        lpwszConnectionName= HeapAlloc(GetProcessHeap(), 0, len*sizeof(WCHAR));
+        MultiByteToWideChar(CP_ACP, 0, lpszConnectionName, -1,
+                            lpwszConnectionName, len);
+    }
+
+    rc = InternetGetConnectedStateExW(lpdwStatus,lpwszConnectionName, dwNameLen,
+                                      dwReserved);
+    if (lpwszConnectionName)
+        HeapFree(GetProcessHeap(),0,lpwszConnectionName);
+
+    return rc;
+}
+
+
+
 /***********************************************************************
  *           InternetConnectW (WININET.@)
  *
Index: dlls/wininet/wininet.spec
===================================================================
RCS file: /home/wine/wine/dlls/wininet/wininet.spec,v
retrieving revision 1.50
diff -u -u -w -r1.50 wininet.spec
--- dlls/wininet/wininet.spec	19 Aug 2004 19:57:37 -0000	1.50
+++ dlls/wininet/wininet.spec	3 Nov 2004 13:59:34 -0000
@@ -127,6 +127,7 @@
 @ stub InternetGetCertByURL
 @ stdcall InternetGetConnectedState(ptr long)
 @ stdcall InternetGetConnectedStateExW(ptr ptr long long)
+@ stdcall InternetGetConnectedStateExA(ptr ptr long long)
 @ stdcall InternetGetCookieA(str str ptr long)
 @ stdcall InternetGetCookieW(wstr wstr ptr long)
 @ stdcall InternetGetLastResponseInfoA(ptr str ptr)


More information about the wine-patches mailing list