winemenubuilder: Improve traces.

Report the EnumResourceNamesW() and failure to find an icon 
separately so traces are less misleading.
This commit is contained in:
Francois Gouget 2006-01-11 12:09:53 +01:00 committed by Alexandre Julliard
parent 6e6d24e959
commit 629889b267
1 changed files with 6 additions and 2 deletions

View File

@ -291,7 +291,11 @@ static BOOL extract_icon32(LPCWSTR szFileName, int nIndex, const char *szXPMFile
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 szFileName, int nIndex, const char *szXPMFile
}
else
{
WINE_ERR("ExtractFromEXEDLL failed, error %ld\n", GetLastError());
WINE_ERR("found no icon\n");
FreeLibrary(hModule);
return FALSE;
}