shell32: Use default system icons if PrivateExtractIconsW in SHGetFileInfoW fails.

This commit is contained in:
Roy Shea 2008-09-10 14:33:02 -07:00 committed by Alexandre Julliard
parent e0dd72162a
commit 5b6806922a
1 changed files with 8 additions and 4 deletions

View File

@ -596,18 +596,22 @@ DWORD_PTR WINAPI SHGetFileInfoW(LPCWSTR path,DWORD dwFileAttributes,
} }
else else
{ {
IconNotYetLoaded=FALSE; UINT ret;
if (flags & SHGFI_SMALLICON) if (flags & SHGFI_SMALLICON)
PrivateExtractIconsW( sTemp,icon_idx, ret = PrivateExtractIconsW( sTemp,icon_idx,
GetSystemMetrics( SM_CXSMICON ), GetSystemMetrics( SM_CXSMICON ),
GetSystemMetrics( SM_CYSMICON ), GetSystemMetrics( SM_CYSMICON ),
&psfi->hIcon, 0, 1, 0); &psfi->hIcon, 0, 1, 0);
else else
PrivateExtractIconsW( sTemp, icon_idx, ret = PrivateExtractIconsW( sTemp, icon_idx,
GetSystemMetrics( SM_CXICON), GetSystemMetrics( SM_CXICON),
GetSystemMetrics( SM_CYICON), GetSystemMetrics( SM_CYICON),
&psfi->hIcon, 0, 1, 0); &psfi->hIcon, 0, 1, 0);
psfi->iIcon = icon_idx; if (ret != 0 && ret != 0xFFFFFFFF)
{
IconNotYetLoaded=FALSE;
psfi->iIcon = icon_idx;
}
} }
} }
} }