473,320 Members | 1,920 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Context Menu Shell Extension problem

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
Dec 12 '07 #1
3 4997
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?

"Poggs" <ae*******@narrasoft.comwrote in message
news:et*************@TK2MSFTNGP06.phx.gbl...
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


Dec 13 '07 #2
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" <ae*******@narrasoft.comwrote in message
news:ui*************@TK2MSFTNGP06.phx.gbl...
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?

"Poggs" <ae*******@narrasoft.comwrote in message
news:et*************@TK2MSFTNGP06.phx.gbl...
>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



Dec 13 '07 #3
Issue Fixed....
Problem is the idCMDFirst and idcmdLast values being messed up..

"Poggs" <ae*******@narrasoft.comwrote in message
news:eo**************@TK2MSFTNGP02.phx.gbl...
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" <ae*******@narrasoft.comwrote in message
news:ui*************@TK2MSFTNGP06.phx.gbl...
>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?

"Poggs" <ae*******@narrasoft.comwrote in message
news:et*************@TK2MSFTNGP06.phx.gbl...
>>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




Dec 18 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: yxq | last post by:
Hello Can anyone tell me Context Menu shell extension? It is better that provide some samples or links. Thanks
2
by: elziko | last post by:
I understand how to edit the registry to add context menu items in windows for any file type. I know I can use %1 for the default value of the command key to signify the filename that has been...
5
by: lgbjr | last post by:
Hello All, I have several Pictureboxes (linked to an AccessDB) on a VB.NET form. I would like to use a context menu to allow the user to open the picture in their default picture viewer or...
0
by: eisbaer | last post by:
hi, i'm trying to write a shell extension for printers in c#. i use the IContextMenu and IShellExtInit interfaces to insert the menu item in the context menu - it works fine. my problem is to...
2
by: Martin Carpella | last post by:
Hi! Can anybody give me a pointer if/how I could retrieve the Explorer context menu of a given file in C#? Thanks in advance, Martin
2
by: auad | last post by:
hi, I would like to know how to implement the following situation in c# or VB.net: I want to know how to display the application icon in the windows context menu (just like winrar does) ...
3
by: Steven | last post by:
Hello, I want to a context menu extension dll like WinZIP, and it supports Windows Vista 32bit & 64bit. Where is it? Thank you Steven
2
by: Jeff Gaines | last post by:
I am in the process of upgrading to XP 64. VS2008 is running fine but one of my apps, which adds functionality to the Explorer context menu, just won't work under XP 64. Googling resulted in my...
1
by: zacks | last post by:
I have figured out how to add custom menu items to various buildin context menus by looking at a project on CodeProject.com and then doing some registry searches. But I can't find how to add a...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.