Define some extra SHFGI values.

This commit is contained in:
Mike McCormack 2005-02-15 15:43:54 +00:00 committed by Alexandre Julliard
parent 0fba748f2a
commit a830bf55ca
2 changed files with 22 additions and 10 deletions

View File

@ -212,8 +212,15 @@ LPWSTR* WINAPI CommandLineToArgvW(LPCWSTR lpCmdline, int* numargs)
return argv; return argv;
} }
#define SHGFI_KNOWN_FLAGS \
(SHGFI_SMALLICON | SHGFI_OPENICON | SHGFI_SHELLICONSIZE | SHGFI_PIDL | \
SHGFI_USEFILEATTRIBUTES | SHGFI_ADDOVERLAYS | SHGFI_OVERLAYINDEX | \
SHGFI_ICON | SHGFI_DISPLAYNAME | SHGFI_TYPENAME | SHGFI_ATTRIBUTES | \
SHGFI_ICONLOCATION | SHGFI_EXETYPE | SHGFI_SYSICONINDEX | \
SHGFI_LINKOVERLAY | SHGFI_SELECTED | SHGFI_ATTR_SPECIFIED)
/************************************************************************* /*************************************************************************
* SHGetFileInfoA [SHELL32.@] * SHGetFileInfoW [SHELL32.@]
* *
*/ */
@ -230,8 +237,9 @@ DWORD WINAPI SHGetFileInfoW(LPCWSTR path,DWORD dwFileAttributes,
HRESULT hr = S_OK; HRESULT hr = S_OK;
BOOL IconNotYetLoaded=TRUE; BOOL IconNotYetLoaded=TRUE;
TRACE("(%s fattr=0x%lx sfi=%p(attr=0x%08lx) size=0x%x flags=0x%x)\n", TRACE("%s fattr=0x%lx sfi=%p(attr=0x%08lx) size=0x%x flags=0x%x\n",
(flags & SHGFI_PIDL)? "pidl" : debugstr_w(path), dwFileAttributes, psfi, psfi->dwAttributes, sizeofpsfi, flags); (flags & SHGFI_PIDL)? "pidl" : debugstr_w(path), dwFileAttributes,
psfi, psfi->dwAttributes, sizeofpsfi, flags);
if ((flags & SHGFI_USEFILEATTRIBUTES) && (flags & (SHGFI_ATTRIBUTES|SHGFI_EXETYPE|SHGFI_PIDL))) if ((flags & SHGFI_USEFILEATTRIBUTES) && (flags & (SHGFI_ATTRIBUTES|SHGFI_EXETYPE|SHGFI_PIDL)))
return FALSE; return FALSE;
@ -392,6 +400,12 @@ DWORD WINAPI SHGetFileInfoW(LPCWSTR path,DWORD dwFileAttributes,
} }
/* ### icons ###*/ /* ### icons ###*/
if (flags & SHGFI_ADDOVERLAYS)
FIXME("SHGFI_ADDOVERLAYS unhandled\n");
if (flags & SHGFI_OVERLAYINDEX)
FIXME("SHGFI_OVERLAYINDEX unhandled\n");
if (flags & SHGFI_LINKOVERLAY) if (flags & SHGFI_LINKOVERLAY)
FIXME("set icon to link, stub\n"); FIXME("set icon to link, stub\n");
@ -424,7 +438,6 @@ DWORD WINAPI SHGetFileInfoW(LPCWSTR path,DWORD dwFileAttributes,
/* get icon index (or load icon)*/ /* get icon index (or load icon)*/
if (SUCCEEDED(hr) && (flags & (SHGFI_ICON | SHGFI_SYSICONINDEX))) if (SUCCEEDED(hr) && (flags & (SHGFI_ICON | SHGFI_SYSICONINDEX)))
{ {
if (flags & SHGFI_USEFILEATTRIBUTES) if (flags & SHGFI_USEFILEATTRIBUTES)
{ {
WCHAR sTemp [MAX_PATH]; WCHAR sTemp [MAX_PATH];
@ -481,8 +494,8 @@ DWORD WINAPI SHGetFileInfoW(LPCWSTR path,DWORD dwFileAttributes,
if (SUCCEEDED(hr) && (flags & SHGFI_ICON) && IconNotYetLoaded) if (SUCCEEDED(hr) && (flags & SHGFI_ICON) && IconNotYetLoaded)
psfi->hIcon = ImageList_GetIcon((flags & SHGFI_SMALLICON) ? ShellSmallIconList:ShellBigIconList, psfi->iIcon, ILD_NORMAL); psfi->hIcon = ImageList_GetIcon((flags & SHGFI_SMALLICON) ? ShellSmallIconList:ShellBigIconList, psfi->iIcon, ILD_NORMAL);
if (flags & (SHGFI_UNKNOWN1 | SHGFI_UNKNOWN2 | SHGFI_UNKNOWN3)) if (flags & ~SHGFI_KNOWN_FLAGS)
FIXME("unknown attribute!\n"); FIXME("unknown flags %08x\n", flags & ~SHGFI_KNOWN_FLAGS);
if (psfParent) if (psfParent)
IShellFolder_Release(psfParent); IShellFolder_Release(psfParent);
@ -499,7 +512,7 @@ DWORD WINAPI SHGetFileInfoW(LPCWSTR path,DWORD dwFileAttributes,
} }
/************************************************************************* /*************************************************************************
* SHGetFileInfoW [SHELL32.@] * SHGetFileInfoA [SHELL32.@]
*/ */
DWORD WINAPI SHGetFileInfoA(LPCSTR path,DWORD dwFileAttributes, DWORD WINAPI SHGetFileInfoA(LPCSTR path,DWORD dwFileAttributes,

View File

@ -115,9 +115,8 @@ UINT WINAPI SHAppBarMessage(DWORD,PAPPBARDATA);
#define SHGFI_SHELLICONSIZE 0x000000004 /* get shell size icon */ #define SHGFI_SHELLICONSIZE 0x000000004 /* get shell size icon */
#define SHGFI_PIDL 0x000000008 /* pszPath is a pidl */ #define SHGFI_PIDL 0x000000008 /* pszPath is a pidl */
#define SHGFI_USEFILEATTRIBUTES 0x000000010 /* use passed dwFileAttribute */ #define SHGFI_USEFILEATTRIBUTES 0x000000010 /* use passed dwFileAttribute */
#define SHGFI_UNKNOWN1 0x000000020 #define SHGFI_ADDOVERLAYS 0x000000020
#define SHGFI_UNKNOWN2 0x000000040 #define SHGFI_OVERLAYINDEX 0x000000040
#define SHGFI_UNKNOWN3 0x000000080
#define SHGFI_ICON 0x000000100 /* get icon */ #define SHGFI_ICON 0x000000100 /* get icon */
#define SHGFI_DISPLAYNAME 0x000000200 /* get display name */ #define SHGFI_DISPLAYNAME 0x000000200 /* get display name */
#define SHGFI_TYPENAME 0x000000400 /* get type name */ #define SHGFI_TYPENAME 0x000000400 /* get type name */