IShellIconOverlay::GetOverlayIconIndex method (shlobj_core.h)
Gets the index of the icon overlay in the system image list.
Syntax
HRESULT GetOverlayIconIndex(
[in] PCUITEMID_CHILD pidl,
[in, out] int *pIconIndex
);
Parameters
[in] pidl
Type: PCUITEMID_CHILD
Pointer to an ITEMIDLIST structure that identifies the object whose icon is being displayed.
[in, out] pIconIndex
Type: int*
Pointer to the index of the icon overlay's image in the system image list. This index is equivalent to the iImage value that is specified when you add an overlay image to a private image list with the ImageList::SetOverlayImage function.
Return value
Type: HRESULT
This method can return one of these values.
Return code | Description |
---|---|
|
The index of an overlay was found. |
|
No overlay exists for this file. |
|
The PIDL is invalid. |
Remarks
To retrieve the overlay's image index in the system image list, you must first call SHGetIconOverlayIndex to retrieve the overlay index. Then use the INDEXTOOVERLAYMASK macro to convert the overlay index into the equivalent image index.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional, Windows XP [desktop apps only] |
Minimum supported server | Windows Server 2003 [desktop apps only] |
Target Platform | Windows |
Header | shlobj_core.h |
DLL | Shell32.dll (version 5.0 or later) |