Commit in reactos/lib/shell32 on MAIN
shfldr_mycomp.c+5-71.12 -> 1.13
Martin Fuchs <martin-fuchs@gmx.net>
- make drive letters in PIDLs always uppercase to enable PIDL
  comparison
- Unicodify _ILCreateDrive()

reactos/lib/shell32
shfldr_mycomp.c 1.12 -> 1.13
diff -u -r1.12 -r1.13
--- shfldr_mycomp.c	20 Sep 2004 09:18:52 -0000	1.12
+++ shfldr_mycomp.c	20 Sep 2004 15:36:07 -0000	1.13
@@ -196,7 +196,6 @@
     HRESULT hr = E_INVALIDARG;
     LPCWSTR szNext = NULL;
     WCHAR szElement[MAX_PATH];
-    CHAR szTempA[MAX_PATH];
     LPITEMIDLIST pidlTemp = NULL;
     CLSID clsid;
 
@@ -218,8 +217,7 @@
     else if (PathGetDriveNumberW (lpszDisplayName) >= 0 && lpszDisplayName[2] == (WCHAR) '\\') {
 	szNext = GetNextElementW (lpszDisplayName, szElement, MAX_PATH);
 	szElement[0] = toupper(szElement[0]); /* make drive letter uppercase to enable PIDL comparison */
-	WideCharToMultiByte (CP_ACP, 0, szElement, -1, szTempA, MAX_PATH, NULL, NULL);
-	pidlTemp = _ILCreateDrive (szTempA);
+	pidlTemp = _ILCreateDrive (szElement);
     }
 
     if (szNext && *szNext) {
@@ -250,15 +248,15 @@
     /*enumerate the folders*/
     if(dwFlags & SHCONTF_FOLDERS)
     {
-        CHAR szDriveName[] = "A:\\";
+        WCHAR wszDriveName[] = {'A', ':', '\\', '\0'};
         DWORD dwDrivemap = GetLogicalDrives();
         HKEY hkey;
 
-        while (ret && szDriveName[0]<='Z')
+        while (ret && wszDriveName[0]<='Z')
         {
             if(dwDrivemap & 0x00000001L)
-                ret = AddToEnumList(list, _ILCreateDrive(szDriveName));
-            szDriveName[0]++;
+                ret = AddToEnumList(list, _ILCreateDrive(wszDriveName));
+            wszDriveName[0]++;
             dwDrivemap = dwDrivemap >> 1;
         }
 
CVSspam 0.2.8