IShellFolderViewCB Is Not Optional
When writing a Shell Namespace Extension with DefView it is important to realize that IShellFolderViewCB is not optional for proper updates of the DefView.
If you construct your DefView like this:
::SHCreateShellFolderView(pcsfv, (IShellView **)ppvReturn);
One of the parameters of SFV_CREATE is psfvcb which points to an instance of IShellFolderViewCB. IShellFolderViewCB is a callback interface that you can use to get notified of what is happening in the DefView.
If you don’t care what DefView is doing it is tempting to leave it NULL. However, if you do this the DefView will not update correctly on calls like this:
::SHChangeNotify(SHCNE_MKDIR, SHCNF_IDLIST | SHCNF_FLUSH, *ppidl, NULL);
So always implement a IShellFolderViewCB interface with the minimum functionality when using the DefView.
{6230289B-5BEE-409e-932A-2F01FA407A92}
Comments
Post a Comment