PRB: GIL_DONTCACHE Causes Incorrect Icon to Display in Namespace Extension (214599)
The information in this article applies to:
- Microsoft Win32 Application Programming Interface (API), when used with:
- Microsoft Windows NT Server 4.0
- Microsoft Windows NT Workstation 4.0
- the operating system: Microsoft Windows 2000
This article was previously published under Q214599 SYMPTOMS
Shell namespace extensions can have different icons for the various shell folders. These icons are displayed in both the tree view and the address bar of Microsoft Windows Explorer.
If the icon handler for a shell folder returns GIL_DONTCACHE as one of the bit flags for the last parameter in the implementation of the IExtractIcon::GetIconLocation function, the icons for the shell namespace extension folder may appear to be random icons.
CAUSE
This problem can occur when the GIL_DONTCACHE flag is set in IExtractIcon::GetIconLocation, without specifying both the szIconFile and piIndex parameters.
RESOLUTION
To force the shell to not cache the icons, and instead to ask the namespace extension for the appropriate icons, do not specify the GIL_DONTCACHE flag for the last parameter in the implementation of the IExtractIcon::GetIconLocation function. If the GIL_DONTCACHE flag is set, also set the szIconFile and piIndex parameters.
STATUS
This behavior is by design.
REFERENCESFor additional information on how to build a namespace extension, click the article number below
to view the article in the Microsoft Knowledge Base:
178665 SAMPLE: RegView.exe Contains Shell Namespace Extension Example
Modification Type: | Minor | Last Reviewed: | 12/20/2004 |
---|
Keywords: | kbIcon kbNameSpace kbprb kbShellGrp KB214599 |
---|
|