Expand Minimize
This topic has not yet been rated - Rate this topic

Shell_GetCachedImageIndex 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_GetCachedImageIndex(
  _In_  PCWSTR pwszIconPath,
  int iIconIndex,
  UINT uIconFlags
);

Parameters

pwszIconPath [in]

Type: PCWSTR

A pointer to a buffer that contains the path to the image file.

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]

End of client support

Windows XP

End of server support

Windows Server 2003

Header

Shlobj.h

Library

Shell32.lib

DLL

Shell32.dll (version 5.0 or later)

Unicode and ANSI names

Shell_GetCachedImageIndexW (Unicode) and Shell_GetCachedImageIndexA (ANSI)

See also

FileIconInit

 

 

Send comments about this topic to Microsoft

Build date: 11/28/2012

Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.