shell: fix broken GetDisplayNamesOf

Jürgen Schmied j.schmied at t-online.de
Thu Jan 9 12:26:46 CST 2003


fix recently broken GetDisplayNamesOf of names of shell extension 
dll's

--
juergen.schmied at debitel.net
FAX über T-Online Fax&Fon: 01805 060 334 316 35 (12Cent/Min)



-------------- next part --------------
--- wine-20021219/dlls/shell32/classes.c	Sat Dec 14 00:45:36 2002
+++ wine/dlls/shell32/classes.c	Thu Jan  9 17:49:13 2003
@@ -149,7 +149,7 @@
 *
 * Gets the icon for a filetype
 */
-static HRESULT HCR_RegOpenClassIDKey(REFIID riid, HKEY *hkey)
+static BOOL HCR_RegOpenClassIDKey(REFIID riid, HKEY *hkey)
 {
 	char	xriid[50];
     sprintf( xriid, "CLSID\\{%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}",
@@ -159,7 +159,7 @@
 
  	TRACE("%s\n",xriid );
 
-	return RegOpenKeyExA(HKEY_CLASSES_ROOT, xriid, 0, KEY_READ, hkey);
+	return !RegOpenKeyExA(HKEY_CLASSES_ROOT, xriid, 0, KEY_READ, hkey);
 }
 
 static BOOL HCR_RegGetDefaultIconW(HKEY hkey, LPWSTR szDest, DWORD len, LPDWORD dwNr)
@@ -253,7 +253,7 @@
 	HKEY	hkey;
 	BOOL	ret = FALSE;
 
-	if (!HCR_RegOpenClassIDKey(riid, &hkey))
+	if (HCR_RegOpenClassIDKey(riid, &hkey))
 	{
 	  ret = HCR_RegGetDefaultIconW(hkey, szDest, len, dwNr);
 	  RegCloseKey(hkey);


More information about the wine-patches mailing list