[MPR] Sync with Wine Staging 3.17. CORE-15127
authorPierre Schweitzer <pierre@reactos.org>
Sat, 8 Dec 2018 10:42:23 +0000 (11:42 +0100)
committerPierre Schweitzer <pierre@reactos.org>
Sat, 8 Dec 2018 10:42:23 +0000 (11:42 +0100)
dll/win32/mpr/wnet.c
media/doc/README.WINE

index bc492c2..09d144e 100644 (file)
@@ -139,9 +139,8 @@ static void _tryLoadProvider(PCWSTR provider)
     HKEY hKey;
 
     TRACE("%s\n", debugstr_w(provider));
-    snprintfW(serviceName, sizeof(serviceName) / sizeof(WCHAR), serviceFmt,
-     servicePrefix, provider);
-    serviceName[sizeof(serviceName) / sizeof(WCHAR) - 1] = '\0';
+    snprintfW(serviceName, ARRAY_SIZE(serviceName), serviceFmt, servicePrefix, provider);
+    serviceName[ARRAY_SIZE(serviceName) - 1] = '\0';
     if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, serviceName, 0, KEY_READ, &hKey) ==
      ERROR_SUCCESS)
     {
@@ -2373,7 +2372,7 @@ DWORD WINAPI WNetGetConnectionA( LPCSTR lpLocalName,
             if (wideLocalName)
             {
                 WCHAR wideRemoteStatic[MAX_PATH];
-                DWORD wideRemoteSize = sizeof(wideRemoteStatic) / sizeof(WCHAR);
+                DWORD wideRemoteSize = ARRAY_SIZE(wideRemoteStatic);
 
                 MultiByteToWideChar(CP_ACP, 0, lpLocalName, -1, wideLocalName, len);
 
@@ -2659,6 +2658,7 @@ DWORD WINAPI WNetGetUniversalNameW ( LPCWSTR lpLocalPath, DWORD dwInfoLevel,
         size = sizeof(*info) + (lstrlenW(lpLocalPath) + 1) * sizeof(WCHAR);
         if (*lpBufferSize < size)
         {
+            *lpBufferSize = size;
             err = WN_MORE_DATA;
             break;
         }
index 262dd57..03609ea 100644 (file)
@@ -98,7 +98,7 @@ reactos/dll/win32/mciwave             # Synced to WineStaging-3.3
 reactos/dll/win32/mgmtapi             # Synced to WineStaging-3.3
 reactos/dll/win32/mlang               # Synced to WineStaging-3.3
 reactos/dll/win32/mmdevapi            # Synced to WineStaging-3.3
-reactos/dll/win32/mpr                 # Synced to WineStaging-3.3
+reactos/dll/win32/mpr                 # Synced to WineStaging-3.17
 reactos/dll/win32/mprapi              # Synced to WineStaging-3.3
 reactos/dll/win32/msacm32             # Synced to WineStaging-3.3
 reactos/dll/win32/msacm32.drv         # Synced to WineStaging-3.3