SHUpdateImageA function

Notifies the Shell that an image in the system image list has changed.

Syntax

void SHUpdateImageA(
  LPCSTR pszHashItem,
  int    iIndex,
  UINT   uFlags,
  int    iImageIndex
);

Parameters

pszHashItem

Type: LPCTSTR

A pointer to a string value that specifies the fully qualified path of the file that contains the icon. Use the path that is returned in the buffer pointed to by the szIconFile parameter of IExtractIcon::GetIconLocation.

iIndex

Type: int

An integer that specifies the zero-based index of the icon in the file specified by pszHashItem. Use the value that is pointed to by the piIndex parameter of IExtractIcon::GetIconLocation.

uFlags

Type: UINT

An unsigned integer that specifies the flags that determine the icon attributes. Set uFlags to the value that is pointed to by the pwFlags parameter of IExtractIcon::GetIconLocation. The flags that are relevant to SHUpdateImage are GIL_NOTFILENAME and GIL_SIMULATEDOC.

iImageIndex

Type: int

An integer that specifies the index in the system image list of the icon that is being updated.

Return Value

No return value.

Remarks

If you do not know the index in the system image list of the icon that you want to update, use SHGetFileInfo with the uFlags parameter set to SHGFI_SYSICONINDEX.

You must use IExtractIcon::GetIconLocation with the parameters of the old icon that needs to be updated, not those of the new icon you want to replace it with.

Requirements

   
Windows version Windows 2000 Professional, Windows XP [desktop apps only] Windows Server 2003 [desktop apps only]
Target Platform Windows
Header shlobj_core.h (include Shlobj.h, Shlobj_core.h)
Library Shell32.lib
DLL Shell32.dll (version 4.7 or later)

See Also

SHChangeNotify