SHUpdateImage function
Notifies the Shell that an image in the system image list has changed.
Syntax
void SHUpdateImage( _In_ LPCTSTR pszHashItem, _In_ int iIndex, _In_ UINT uFlags, _In_ int iImageIndex );
Parameters
- pszHashItem [in]
-
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 [in]
-
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 [in]
-
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 [in]
-
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
|
Minimum supported client |
Windows 2000 Professional, Windows XP [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows Server 2003 [desktop apps only] |
|
Header |
|
|
Library |
|
|
DLL |
|
|
Unicode and ANSI names |
SHUpdateImageW (Unicode) and SHUpdateImageA (ANSI) |
See also