Commit in reactos/lib/mpr on MAIN
mpr_main.c+31.3 -> 1.4
wnet.c+9-81.3 -> 1.4
+12-8
2 modified files
Sync to Wine-20040615:
Patrik Stridvall <ps@leissner.se>
- Fixed some issues found by winapi_check.
Krishna Murthy <Krishna.Murthy@guptaworldwide.com>
- WNetGetConnection(): use QueryDosDevice to return a fake remote name
  instead of the drive label.

reactos/lib/mpr
mpr_main.c 1.3 -> 1.4
diff -u -r1.3 -r1.4
--- mpr_main.c	15 Apr 2004 09:28:04 -0000	1.3
+++ mpr_main.c	16 Jun 2004 06:58:48 -0000	1.4
@@ -81,6 +81,9 @@
     return S_OK;
 }
 
+/*****************************************************************
+ *  DllMain  [MPR.init]
+ */
 BOOL WINAPI DllMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
 {
     switch (fdwReason) {

reactos/lib/mpr
wnet.c 1.3 -> 1.4
diff -u -r1.3 -r1.4
--- wnet.c	15 Apr 2004 09:28:04 -0000	1.3
+++ wnet.c	16 Jun 2004 06:58:48 -0000	1.4
@@ -1548,6 +1548,8 @@
                 WCHAR wideRemoteStatic[MAX_PATH];
                 DWORD wideRemoteSize = sizeof(wideRemoteStatic) / sizeof(WCHAR);
 
+                MultiByteToWideChar(CP_ACP, 0, lpLocalName, -1, wideLocalName, len);
+
                 /* try once without memory allocation */
                 ret = WNetGetConnectionW(wideLocalName, wideRemoteStatic,
                  &wideRemoteSize);
@@ -1633,28 +1635,27 @@
         ret = WN_BAD_LOCALNAME;
     else
     {
-        WCHAR label[40];
-
         if (lpLocalName[1] == ':')
         {
             switch(GetDriveTypeW(lpLocalName))
             {
             case DRIVE_REMOTE:
-                if (!GetVolumeInformationW( lpLocalName, label, sizeof(label),
-                                            NULL, NULL, NULL, NULL, 0 ))
-                    label[0] = 0;
-                if (strlenW(label) + 1 > *lpBufferSize)
+            {
+                WCHAR remote[MAX_PATH];
+                if (!QueryDosDeviceW( lpLocalName, remote, MAX_PATH )) remote[0] = 0;
+                if (strlenW(remote) + 1 > *lpBufferSize)
                 {
-                    *lpBufferSize = strlenW(label) + 1;
+                    *lpBufferSize = strlenW(remote) + 1;
                     ret = WN_MORE_DATA;
                 }
                 else
                 {
-                    strcpyW( lpRemoteName, label );
+                    strcpyW( lpRemoteName, remote );
                     *lpBufferSize = strlenW(lpRemoteName) + 1;
                     ret = WN_SUCCESS;
                 }
                 break;
+            }
             case DRIVE_REMOVABLE:
             case DRIVE_FIXED:
             case DRIVE_CDROM:
CVSspam 0.2.8