Shell_GetCachedImageIndexA function

[Shell_GetCachedImageIndex is available for use in the operating systems specified in the Requirements section. It may be altered or unavailable in subsequent versions. Instead, use Shell_GetCachedImageIndexA or Shell_GetCachedImageIndexW.]

Retrieves the cache index of a cached icon.

Syntax

int Shell_GetCachedImageIndexA(
  LPCSTR pszIconPath,
  int    iIconIndex,
  UINT   uIconFlags
);

Parameters

pszIconPath

TBD

iIconIndex

Type: int

The index of the image within the file named at pwszIconPath.

uIconFlags

Type: UINT

Not used.

Return Value

Type: int

Returns the index of the image, or –1 on failure.

Remarks

The Shell_GetCachedImageIndexA and Shell_GetCachedImageIndexW versions of this function were added in Windows Vista. For Unicode strings, call either Shell_GetCachedImageIndexW or Shell_GetCachedImageIndex. For ANSI strings, you must call Shell_GetCachedImageIndexA explicitly.

Windows Server 2003 and Windows XP:  Only Shell_GetCachedImageIndex is supported. Shell_GetCachedImageIndex requires a Unicode string.

Requirements

   
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header shlobj_core.h (include Shlobj.h, Shlobj_core.h, Shlobj.h, Shlobj_core.h)
Library Shell32.lib
DLL Shell32.dll (version 5.0 or later)

See Also

FileIconInit