At 03:01 PM 2/17/02 +0100, you wrote:
<snip>
Well, this value of 0xffffff69 is suspicious.
I think that this code may be too optimist :
BOOL HCR_GetDefaultIcon (LPCSTR szClass, LPSTR szDest, DWORD len, LPDWORD dwNr) { HKEY hkey; char sTemp[MAX_PATH]; char sNum[5]; DWORD dwType; BOOL ret = FALSE;
TRACE("%s\n",szClass );
sprintf(sTemp, "%s\DefaultIcon",szClass);
if (!RegOpenKeyExA(HKEY_CLASSES_ROOT,sTemp,0,0x02000000,&hkey)) { if (!RegQueryValueExA(hkey, NULL, 0, &dwType, szDest, &len)) { if (dwType == REG_EXPAND_SZ) { ExpandEnvironmentStringsA(szDest, sTemp, MAX_PATH); strcpy(szDest, sTemp); } if (ParseFieldA (szDest, 2, sNum, 5)) *dwNr=atoi(sNum); ParseFieldA (szDest, 1, szDest, len); ret = TRUE; } RegCloseKey(hkey); } TRACE("-- %s %li\n", szDest, *dwNr ); return ret; }
in this case, maybe you could try something like : if (ParseFieldA(szDest, 2, sNum, 5)) *dwNr = atoi(sNum); else *dwNr = 0;
I'm not sure it's correct, since it would mean that Wine would always search for the icon 0 in the file. As I don't know what is the exact meaning of the icon number in the registry, I can't say more. However, it *should* not crash anymore (if I'm right) as at least dwNr would be initialized.
Gerard
Thanks,
I have no more crash (tested with differents folders) and the icon of "gz" files is correct.
Mehmet