Wayne Berry
2007-09-23 17:06:03 UTC
Preface: I have been working on a Namespace Extension for 6 months and have
completed almost all of it, except for a few issue I can't seem to resolve
with the Shell API. I have worked all my code paths to the end, and because
of a few, hopefully small, issues I can not complete and need some help. I
have signed up for MSDN and will be posting a few questions to this managed
newsgroup over the next couple of weeks to try to solve my last issues.
Thanks for any help you can give -- I will not give up on this till I figure
it all out.
I have a custom namespace extension, that emulates a hard drive out of My
Computer using the Def View. The namespace extension has folders and files,
and subfolders in both the root and deeper.
For each folder and file I have a unqiue PIDL, and for each file and folder
in a subfolder I have a unqiue PIDL, however if I need fully qualified PIDL
the PIDL chain includes the subfolder PIDLs above it. Much like the shell
does. Any example of a fully qualified PIDL of a file in a subfolder:
DESKTOP -> MY COMPUTER -> NAMESPACE EXTENSION -> SUBFOLDER -> FILE
The problem is: When I call SHChangeNotify to notify the DefView that
something has changed, i.e. I have deleted a file -- the DefView only gets
update when the fully qualified PIDL is in the namespace i.e. like this:
DESKTOP -> MY COMPUTER -> NAMESPACE EXTENSION -> FILE
When I call SHChangeNotify on a fully qualified PIDL that is deeper, i.e. in
a subfolder, the item is not removed/updated in the DefView, example:
DESKTOP -> MY COMPUTER -> NAMESPACE EXTENSION -> SUBFOLDER -> FILE
Is this what is to be expected from DefView?
For some reason the IShellView of DefView isn't getting the SHChangeNotify
message when it is viewing the subfolder. I think my possiblies for fixing
this issue are:
1) Always use unique PIDLs, however the PIDLs are always in the namespace
extension when fully qualified -- i.e. don't have PIDL chains that include
subfolders.
2) I am creating my IShellView from DefView incorrectly when travesing to a
sub folder (via IShellFolder::CreateViewWindow), and shell doesn't know how
to find the view to send SHChangeNotify to DefView.
3) Somehow via ParseDisplay name, and other IShellFolder APIs I am suppose
to tell the Shell how to find the IShellView so that it can send
SHChangeNotify messages to DefView.
4) I am constructing a bad or invalid fully qualified PIDL -- however, I
have checked over my code again and again and it appears correct.
I have also noticed that when I call SHChangeNotifyRegister with a fully
qualfied PIDL that is a file in a subfolder within my namespace extension,
SHChangeNotifyRegister fails. So if DefView is using SHChangeNotifyRegister
and it is failing for the DefView, this might be the reason that my
SHChangeNotify messages are not making it to DefView.
I am looking for someone that knows to say to me -- this is the way you have
to do it, or yes that is a know issue, or I have this working, etc...
Much Thanks In Advance.
-Wayne
completed almost all of it, except for a few issue I can't seem to resolve
with the Shell API. I have worked all my code paths to the end, and because
of a few, hopefully small, issues I can not complete and need some help. I
have signed up for MSDN and will be posting a few questions to this managed
newsgroup over the next couple of weeks to try to solve my last issues.
Thanks for any help you can give -- I will not give up on this till I figure
it all out.
I have a custom namespace extension, that emulates a hard drive out of My
Computer using the Def View. The namespace extension has folders and files,
and subfolders in both the root and deeper.
For each folder and file I have a unqiue PIDL, and for each file and folder
in a subfolder I have a unqiue PIDL, however if I need fully qualified PIDL
the PIDL chain includes the subfolder PIDLs above it. Much like the shell
does. Any example of a fully qualified PIDL of a file in a subfolder:
DESKTOP -> MY COMPUTER -> NAMESPACE EXTENSION -> SUBFOLDER -> FILE
The problem is: When I call SHChangeNotify to notify the DefView that
something has changed, i.e. I have deleted a file -- the DefView only gets
update when the fully qualified PIDL is in the namespace i.e. like this:
DESKTOP -> MY COMPUTER -> NAMESPACE EXTENSION -> FILE
When I call SHChangeNotify on a fully qualified PIDL that is deeper, i.e. in
a subfolder, the item is not removed/updated in the DefView, example:
DESKTOP -> MY COMPUTER -> NAMESPACE EXTENSION -> SUBFOLDER -> FILE
Is this what is to be expected from DefView?
For some reason the IShellView of DefView isn't getting the SHChangeNotify
message when it is viewing the subfolder. I think my possiblies for fixing
this issue are:
1) Always use unique PIDLs, however the PIDLs are always in the namespace
extension when fully qualified -- i.e. don't have PIDL chains that include
subfolders.
2) I am creating my IShellView from DefView incorrectly when travesing to a
sub folder (via IShellFolder::CreateViewWindow), and shell doesn't know how
to find the view to send SHChangeNotify to DefView.
3) Somehow via ParseDisplay name, and other IShellFolder APIs I am suppose
to tell the Shell how to find the IShellView so that it can send
SHChangeNotify messages to DefView.
4) I am constructing a bad or invalid fully qualified PIDL -- however, I
have checked over my code again and again and it appears correct.
I have also noticed that when I call SHChangeNotifyRegister with a fully
qualfied PIDL that is a file in a subfolder within my namespace extension,
SHChangeNotifyRegister fails. So if DefView is using SHChangeNotifyRegister
and it is failing for the DefView, this might be the reason that my
SHChangeNotify messages are not making it to DefView.
I am looking for someone that knows to say to me -- this is the way you have
to do it, or yes that is a know issue, or I have this working, etc...
Much Thanks In Advance.
-Wayne