SHUpdateImageA function (shlobj_core.h)
Notifies the Shell that an image in the system image list has changed.
void SHUpdateImageA( LPCSTR pszHashItem, int iIndex, UINT uFlags, int iImageIndex );
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.
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.
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.
An integer that specifies the index in the system image list of the icon that is being updated.
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.
The shlobj_core.h header defines SHUpdateImage as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.
|Minimum supported client||Windows 2000 Professional, Windows XP [desktop apps only]|
|Minimum supported server||Windows Server 2003 [desktop apps only]|
|Header||shlobj_core.h (include Shlobj.h, Shlobj_core.h)|
|DLL||Shell32.dll (version 4.7 or later)|