Context Menu Shell Extension problem

P

Poggs

Hi everyone,
I used the pattern for Shell Extensions for Context menu from Dino
Esposito's article. However I implemented it in more than one application
and it seems that those two right click functionalities cannot work
together.
void IContextMenu.InvokeCommand (IntPtr pici)

I put more debugging information and I noticed that the two assemblies are
using a common value. I haved changed their namespaces and guids to be
different but still I am getting the same value.



How do I resolve this.



Aldwin
 
P

Poggs

Another thing that I noticed here is that other context menu are not working
too. An example is the OpenWith menu. Before it displays the different
application where you can open a file but now it displays "Open With" text
inside the Open With context menu.

How is this happening?
 
P

Poggs

Additional Information
I added some debugging information and I noticed that the IDCmdFirst value
is higher than the idCmdLast.
First application generates
[2228] Initializing Shell Extensions
[2228] pidlFolder : 0
[2228] lpdobj : 22245384
[2228] hKeyProgID : 2454
[2228] >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
[2228] Query Context Menu
[2228] hMenu : 366805703
[2228] iMenu : 0
[2228] icmdFirst : 31092
[2228] idcmdLast : 31226
[2228] uFlags : 131088
[2228] hmnuPopup : 7538337
[2228] m_hDrop : 83582664

Second application generates this

[2228] Initializing Shell Extensions
[2228] pidlFolder : 0
[2228] lpdobj : 22245384
[2228] hKeyProgID : 2454
[2228] >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
[2228] Query Context Menu
[2228] hMenu : 366805703
[2228] iMenu : 0
[2228] icmdFirst : 62289
[2228] idcmdLast : 31226
[2228] uFlags : 131088
[2228] hmnuPopup : 34145945
[2228] m_hDrop : 1094128

Also noticed that they both have the same uflags..

But both context menu extensions are working fine if only one of them are
installed in the machine.
 
P

Poggs

Issue Fixed....
Problem is the idCMDFirst and idcmdLast values being messed up..

Poggs said:
Additional Information
I added some debugging information and I noticed that the IDCmdFirst value
is higher than the idCmdLast.
First application generates
[2228] Initializing Shell Extensions
[2228] pidlFolder : 0
[2228] lpdobj : 22245384
[2228] hKeyProgID : 2454
[2228] >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
[2228] Query Context Menu
[2228] hMenu : 366805703
[2228] iMenu : 0
[2228] icmdFirst : 31092
[2228] idcmdLast : 31226
[2228] uFlags : 131088
[2228] hmnuPopup : 7538337
[2228] m_hDrop : 83582664

Second application generates this

[2228] Initializing Shell Extensions
[2228] pidlFolder : 0
[2228] lpdobj : 22245384
[2228] hKeyProgID : 2454
[2228] >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
[2228] Query Context Menu
[2228] hMenu : 366805703
[2228] iMenu : 0
[2228] icmdFirst : 62289
[2228] idcmdLast : 31226
[2228] uFlags : 131088
[2228] hmnuPopup : 34145945
[2228] m_hDrop : 1094128

Also noticed that they both have the same uflags..

But both context menu extensions are working fine if only one of them are
installed in the machine.

Poggs said:
Another thing that I noticed here is that other context menu are not
working too. An example is the OpenWith menu. Before it displays the
different application where you can open a file but now it displays "Open
With" text inside the Open With context menu.

How is this happening?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top