Improve winemenubuilder traces

Francois Gouget fgouget at codeweavers.com
Tue Jan 10 12:25:08 CST 2006


Changelog;

  * programs/winemenubuilder/winemenubuilder.c

    Francois Gouget <fgouget at codeweavers.com>
    Report the EnumResourceNamesW() and failure to find an icon 
separately so traces are less misleading.

-- 
Francois Gouget
fgouget at codeweavers.com

-------------- next part --------------
Index: programs/winemenubuilder/winemenubuilder.c
===================================================================
RCS file: /var/cvs/wine/programs/winemenubuilder/winemenubuilder.c,v
retrieving revision 1.39
diff -u -p -r1.39 winemenubuilder.c
--- programs/winemenubuilder/winemenubuilder.c	3 Jan 2006 12:40:39 -0000	1.39
+++ programs/winemenubuilder/winemenubuilder.c	3 Jan 2006 18:35:38 -0000
@@ -291,7 +291,11 @@ static BOOL extract_icon32(LPCWSTR szFil
         hResInfo=NULL;
         sEnumRes.pResInfo = &hResInfo;
         sEnumRes.nIndex = nIndex;
-        EnumResourceNamesW(hModule, (LPCWSTR)RT_GROUP_ICON, EnumResNameProc, (LONG_PTR)&sEnumRes);
+        if (!EnumResourceNamesW(hModule, (LPCWSTR)RT_GROUP_ICON,
+                                EnumResNameProc, (LONG_PTR)&sEnumRes))
+        {
+            WINE_TRACE("EnumResourceNamesW failed, error %ld\n", GetLastError());
+        }
     }
 
     if (hResInfo)
@@ -320,7 +324,7 @@ static BOOL extract_icon32(LPCWSTR szFil
     }
     else
     {
-        WINE_ERR("ExtractFromEXEDLL failed, error %ld\n", GetLastError());
+        WINE_ERR("found no icon\n");
         FreeLibrary(hModule);
         return FALSE;
     }


More information about the wine-patches mailing list