I'm currently trying to create a custom Shell Namespace Extension (for presenting a virtual folder containing "subfolders" and "files", which are actually the representation of data in a hierarchical tree structure from a remote service).
The extension is written C#, which - I'm aware - used to be a bad idea, but ever since .NET 4 introduced the possibility of different versions of the .NET runtime coexisting within the same process, I figured this limitation was no longer an issue.
So far I've gotten it to work fine in Windows XP by following the plenty examples and references available on the web, but when I try it in Windows 7 (I have not tried it in Vista yet, so I don't know whether it would work there), the extension is not loaded. According to my debug log output, it registers fine, but when I open a Windows Explorer window, none of the usual calls to the COM interfaces seem to occur (usually starting with IPersistFolder::Initialize). In fact, not even the class constructor is being called. I do not know whether the interfaces are being queried for (successfully or not) because I'm not sure how to detect that in .NET so I can log it. So, basically, I don't have any clues to go by, because it fails even before I get the chance to record any useful info about what might be going wrong.
Does anyone happen to have any idea what the problem might be? Are there any peculiarities in Windows 7 as opposed to Windows XP that need to be taken into account when dealing with shell namespace extensions that I should be aware of? If more details are required, feel free to ask (I tried to keep it brief, because I'm sure noone would appreciate me copy&pasting my entire code here, and I couldn't cut it down to just the relevant parts because I simply don't know which ones these are...)
I had a very similar case just now:
I was using ATL and 64bit, so I knew .NET was not my problem.
Turns out the problem was I didn't have the following value in the registry: [HKEY_CLASSES_ROOT\CLSID\{your CLSID}\ShellFolder] "Attributes"=dword:20000000
(It's not enough to have the key or value exist - you need to have (at least) this specific attribute value to get something started).
After you add it, you need to kill all explorer.exe processes and start one again (e.g. using task manager). I hope this solves your problem too.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With