473,626 Members | 3,245 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.In vokeCommand (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 5040
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*******@narr asoft.comwrote in message
news:et******** *****@TK2MSFTNG P06.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.In vokeCommand (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*******@narr asoft.comwrote in message
news:ui******** *****@TK2MSFTNG P06.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*******@narr asoft.comwrote in message
news:et******** *****@TK2MSFTNG P06.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.In vokeCommand (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*******@narr asoft.comwrote in message
news:eo******** ******@TK2MSFTN GP02.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*******@narr asoft.comwrote in message
news:ui******** *****@TK2MSFTNG P06.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*******@narr asoft.comwrote in message
news:et******* ******@TK2MSFTN GP06.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.In vokeCommand (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
2714
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
1526
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 clicked on. However, if I select multiple file names then the executable given in the default value is called multiple times. Is there an option other than %1 which will send all the filenames to the executable in one command line? Thanks!
5
2274
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 editor. I'd like to use the same default viewer/editor and open with... choices that are present on the users computer. Does anyone know how I can find this information programatically, so my picturebox context menu uses the same settings as the...
0
1191
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 find out to which printer the context menu belongs. example: i have three printers installed on my system.
2
2169
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
2018
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) Thanks in advance
3
1432
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
1920
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 finding an article saying that MSFT recommends against writing shell extensions in managed code and does not consider them a supported scenario. So, can anybody point me to any articles relating to writing shell extensions in non managed code...
1
2457
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 complex menu item, that is, a menu item that has a submenu, or possibly a sub-submenu. I also cannot figure out how to tell windows just where in the menu the new menu item should appear, or how to add a new separator line to setoff the new menu...
0
8269
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8711
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8642
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8368
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7203
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5576
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4094
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2630
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1515
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.