SHGetFileInfo32A: get SHGFI_SYSICONINDEX implemented.

oldstable
Juergen Schmied 1998-12-18 14:45:07 +00:00 committed by Alexandre Julliard
parent edfca5b7fe
commit 8c449a58aa
1 changed files with 25 additions and 19 deletions

View File

@ -106,6 +106,7 @@ DWORD WINAPI SHGetFileInfo32A(LPCSTR path,DWORD dwFileAttributes,
UINT32 flags )
{ CHAR szTemp[MAX_PATH];
LPPIDLDATA pData;
LPITEMIDLIST pPidlTemp = NULL;
DWORD ret=0;
TRACE(shell,"(%s,0x%lx,%p,0x%x,0x%x)\n",
@ -113,11 +114,13 @@ DWORD WINAPI SHGetFileInfo32A(LPCSTR path,DWORD dwFileAttributes,
/* translate the pidl to a path*/
if (flags & SHGFI_PIDL)
{ SHGetPathFromIDList32A ((LPCITEMIDLIST)path,szTemp);
{ pPidlTemp = (LPCITEMIDLIST)path;
SHGetPathFromIDList32A (pPidlTemp, szTemp);
TRACE(shell,"pidl=%p is %s\n", path, szTemp);
}
else
{ TRACE(shell,"path=%p\n",path);
{ strcpy(szTemp,path);
TRACE(shell,"path=%s\n", szTemp);
}
if (flags & SHGFI_ATTRIBUTES)
@ -189,8 +192,12 @@ DWORD WINAPI SHGetFileInfo32A(LPCSTR path,DWORD dwFileAttributes,
}
if (flags & SHGFI_SYSICONINDEX)
{ FIXME(shell,"get the SYSICONINDEX\n");
psfi->iIcon=32;
{ if (!pPidlTemp)
{ pPidlTemp = ILCreateFromPath (szTemp);
}
psfi->iIcon = SHMapPIDLToSystemImageListIndex (NULL, pPidlTemp, 0);
TRACE(shell,"-- SYSICONINDEX %i\n", psfi->iIcon);
if (flags & SHGFI_SMALLICON)
{ TRACE(shell,"set to small icon\n");
ret = (DWORD) ShellSmallIconList;
@ -201,7 +208,6 @@ DWORD WINAPI SHGetFileInfo32A(LPCSTR path,DWORD dwFileAttributes,
}
}
return ret;
}