Microsoft KB Archive/315977

= PRB: Namespace Extension Folder Does Not Update Correctly in Windows Explorer Tree View =

Article ID: 315977

Article Last Modified on 11/21/2006

-

APPLIES TO


 * Microsoft Win32 Application Programming Interface, when used with:
 * Microsoft Windows XP Professional

-



This article was previously published under Q315977



SYMPTOMS
When you send the SHCNE_UPDATEDIR notification with the SHChangeNotify function to update the contents of a namespace extension folder, the folder node in Windows Explorer tree view may not update correctly. Subfolders that no longer exist in the folder still appear in the tree.



CAUSE
Windows Explorer's tree view shares information with folder objects primarily through their IShellFolder interface. The following list outlines the process:


 * 1) Windows Explorer tree view calls the IShellFolder::EnumObjects method of the folder to enumerate the folder's subfolders while Windows Explorer tree view processes the SHCNE_UPDATEDIR notification.
 * 2) Windows Explorer tree view calls the IShellFolder::GetAttributesOf method with the SFGAO_VALIDATE flag on subfolders that exist in the tree but that are not found in the enumeration.
 * 3) Windows Explorer tree view removes the subfolders from the tree if the call to IShellFolder::GetAttributesOf returns a failure code.



RESOLUTION
Ensure that namespace extensions handle SFGAO_VALIDATE correctly in their IShellFolder::GetAttributesOf method. The namespace extensions return an error if one or more of the objects that is passed to GetAttributesOf no longer exists.

