SHMapPIDLToSystemImageListIndex function

[SHMapPIDLToSystemImageListIndex is available for use in the operating systems specified in the Requirements section. It may be altered or unavailable in subsequent versions.]

Retrieves the icon index from the system image list that is associated with a folder item.


int SHMapPIDLToSystemImageListIndex(
  IShellFolder    *pshf,
  int             *piIndexSel



Type: IShellFolder*

An IShellFolder interface pointer for the folder that contains the item.



A pointer to the item's ITEMIDLIST structure.


Type: int*

A pointer to an int that, when this function returns successfully, receives the index of the item's open icon in the system image list. If the item does not have a special open icon then the index of its normal icon is returned. If the open icon exists and cannot be obtained, then the value pointed to by piIndex is set to -1. This parameter can be NULL if the calling application is not interested in the open icon.

Return Value

Type: int

Returns the index of the item's normal icon in the system image list if successful, or -1 otherwise.


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