Shell Extension - Context Menu

Hello,

I'm having a problem about displaying a menu item in Windows 7 64bit.

I'd like to add a menu item into context menu after right-clicking on a file in Windows Explorer. to display it, I did as below.
- Register a classID into registry so that Windows Explorer load my DLL whenever right-click on a file.
HKEY_CLASSES_ROOT
|*
|shellex
|ContextMenuHandler
|My_Menu_Item
|Default item store ClassID value
- Register COM object
HKEY_CLASSES_ROOT
|Wow6432Node
|CLSID
|My ClassID value
|My_Menu_Item
|InprocServer32
|Default item store the location if DLL file

In window XP, after right-click on file, my dll file is loaded successfully.
However, in windows 7 64bit, this dll file isn't loaded.

Please kindly help me to give the solution.
Thanks.

The biggest difference between Win XP and Win 7 in this context is UAC. Are you running your executable from an elevated command prompt? Or have you tried temporarily turning UAC off to test this? http://windows.microsoft.com/en-US/Windows-vista/Turn-User-Account-Control-on-or-off

Just to check...

Are you trying to load a 32-bit extension into the 64-bit version of Windows Explorer??

(the Wow6432Node in the registration code makes me wonder if you are doing so.)

Andy
Last edited on
@Computergeek01: Thanks for replying. I had already switched off UAC.
@Andy: Thanks for replying
In my source code. I registered COM object at HKEY_CLASSES_ROOT\CLSID\My ClassID value\InprocServer32\Default store dll file path.

However, after performing to register in Window 7 64bit, it writes at
HKEY_CLASSES_ROOT\Wow6432Node\CLSID\...

Therefore, I tried to manually register at HKEY_CLASSES_ROOT\CLSID\My ClassID value\InprocServer32\Default store dll file path. The result is the same.

Please help me.

Last edited on
If your DLL is registering itself under the Wow6432Node it's saying it's a 32-bit DLL. These cannot be loaded by the 64-bit version of Explorer; you need to build a 64-bit version of your DLL.

Andy
Last edited on
HI Andy,

Thanks for your answer, I'll try building 64bit DLL
As a shell extension is loaded in the same process as Explorer, it cannot be a 32 bit DLL.

Not related to your problem, you can register the shell extension in HKEY_CURRENT_USER too if you don't have administrator access (it will work only for the current user)
@Andy: I tried building a 64-bit version. It runs successfully.

@Modoran:

Not related to your problem, you can register the shell extension in HKEY_CURRENT_USER too if you don't have administrator access (it will work only for the current user)
===> Thanks. This is a new information for me. I'll try checking it. Thanks so much.


Thanks all.
:D
Cuong Le
Last edited on
Topic archived. No new replies allowed.