AndreiRV
2010-12-14 17:28:59 UTC
Hi,
my NSE has some folders that shows the number of items inside. That
is, the name of the folder, and also its PIDL contains the number of
items, for example MyFolder(10).
The case is: the user displays the folder's content, and deletes an
item. In this case, the folder's name should be changed to
MyFolder(9).
I compute the new folder PIDL, update it inside my IShellFolder
implementation, and call SHChangeNotify(SHCNE_RENAMEFOLDER).
First problem: the tree view, folder view and address bar are
successfully updated. But the title bar still shows the old name.
Second problem: if, after that, the user deletes another item, the
system calls my IShellFolder::BindToObject(IID_IShellFolder)
implementation still with the old PIDL (MyFolder(10)). I noticed also
GetAttributesOf with SFGAO_VALIDATE is called with the old PIDL (and I
return HRESULT_FROM_WIN32(ERROR_DIRECTORY)).
As a result of BindToObject being called with the old PIDL, my NSE
thinks that the old name is still MyFolder(10) and tries to change the
name to MyFolder(9), instead of changing MyFolder(9) to MyFolder(8).
How can I stop Explorer calling BindToObject with the old PIDL ? Why
that happens even though I don't validate the item ?
Regards,
Andrei
my NSE has some folders that shows the number of items inside. That
is, the name of the folder, and also its PIDL contains the number of
items, for example MyFolder(10).
The case is: the user displays the folder's content, and deletes an
item. In this case, the folder's name should be changed to
MyFolder(9).
I compute the new folder PIDL, update it inside my IShellFolder
implementation, and call SHChangeNotify(SHCNE_RENAMEFOLDER).
First problem: the tree view, folder view and address bar are
successfully updated. But the title bar still shows the old name.
Second problem: if, after that, the user deletes another item, the
system calls my IShellFolder::BindToObject(IID_IShellFolder)
implementation still with the old PIDL (MyFolder(10)). I noticed also
GetAttributesOf with SFGAO_VALIDATE is called with the old PIDL (and I
return HRESULT_FROM_WIN32(ERROR_DIRECTORY)).
As a result of BindToObject being called with the old PIDL, my NSE
thinks that the old name is still MyFolder(10) and tries to change the
name to MyFolder(9), instead of changing MyFolder(9) to MyFolder(8).
How can I stop Explorer calling BindToObject with the old PIDL ? Why
that happens even though I don't validate the item ?
Regards,
Andrei