shell32:Change calls to CLSIDFromString to SHCLSIDFromStringW

Rolf Kalbermatter rolf.kalbermatter at citeng.com
Sun Dec 15 15:10:25 CST 2002


Changelog
  * dlls/shell32/shellole.c
    Remove declaration of SHCLSIDFromStringA as it is already declared in undocshell.h
  * dlls/shell32/pidl.c
  * dlls/shell32/shfldr_desktop.c
    shell32:Change calls to CLSIDFromString to SHCLSIDFromStringW except
    in SHCLSIDFromStringW for the time being

License X11 and LGPL

Rolf Kalbermatter

Index: dlls/shell32/shellole.c
===================================================================
RCS file: /home/wine/wine/dlls/shell32/shellole.c,v
retrieving revision 1.53
diff -u -r1.53 shellole.c
--- dlls/shell32/shellole.c	21 Nov 2002 23:56:42 -0000	1.53
+++ dlls/shell32/shellole.c	15 Dec 2002 21:07:48 -0000
@@ -42,7 +42,6 @@
 
 WINE_DEFAULT_DEBUG_CHANNEL(shell);
 
-DWORD WINAPI SHCLSIDFromStringA (LPCSTR clsid, CLSID *id);
 extern HRESULT WINAPI IFSFolder_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv);
 
 const WCHAR sShell32[12] = {'S','H','E','L','L','3','2','.','D','L','L','\0'};

Index: dlls/shell32/pidl.c
===================================================================
RCS file: /home/wine/wine/dlls/shell32/pidl.c,v
retrieving revision 1.79
diff -u -r1.79 pidl.c
--- dlls/shell32/pidl.c	13 Dec 2002 23:45:36 -0000	1.79
+++ dlls/shell32/pidl.c	15 Dec 2002 21:06:49 -0000
@@ -1162,17 +1162,14 @@
 
 LPITEMIDLIST _ILCreateSpecial(LPCSTR szGUID)
 {
-    IID iid;
-    WCHAR buffer[40];
+	IID iid;
 
-    if (!MultiByteToWideChar( CP_ACP, 0, szGUID, -1, buffer, sizeof(buffer)/sizeof(WCHAR) ))
-        return NULL;
-
-    if (! SUCCEEDED (CLSIDFromString( buffer, &iid ))) {
-	ERR("%s is not a GUID\n", szGUID);
-	return NULL;
-    }
-    return _ILCreate(PT_MYCOMP, &iid, sizeof(IID));
+	if (!SUCCEEDED(SHCLSIDFromStringA(szGUID, &iid)))
+	{
+	  ERR("%s is not a GUID\n", szGUID);
+	  return NULL;
+	}
+	return _ILCreate(PT_MYCOMP, &iid, sizeof(IID));
 }
 
 /**************************************************************************
Index: dlls/shell32/shfldr_desktop.c
===================================================================
RCS file: /home/wine/wine/dlls/shell32/shfldr_desktop.c,v
retrieving revision 1.6
diff -u -r1.6 shfldr_desktop.c
--- dlls/shell32/shfldr_desktop.c	15 Dec 2002 01:14:04 -0000	1.6
+++ dlls/shell32/shfldr_desktop.c	15 Dec 2002 20:53:53 -0000
@@ -205,7 +205,7 @@
     if (lpszDisplayName[0] == ':' && lpszDisplayName[1] == ':') {
 	szNext = GetNextElementW (lpszDisplayName, szElement, MAX_PATH);
 	TRACE ("-- element: %s\n", debugstr_w (szElement));
-	CLSIDFromString (szElement + 2, &clsid);
+	SHCLSIDFromStringW (szElement + 2, &clsid);
 	pidlTemp = _ILCreate (PT_MYCOMP, &clsid, sizeof (clsid));
     } else if (PathGetDriveNumberW (lpszDisplayName) >= 0) {
 	/* it's a filesystem path with a drive. Let MyComputer parse it */




More information about the wine-patches mailing list