Shell Extension - Context Menu and GUID

From: Damjan Vengušt (damjan.vengust_at_guest.arnes.si)
Date: 10/30/04


Date: Sat, 30 Oct 2004 14:59:20 +0200

Hey !

I made a simple shell extension program, which adds custom item in
context menu.

I understand how it works, when I have only one additional menu item.
What If I need to add more than one item.

I guess each menu item should have it's own GUID. How to create COM
object in this case.

This is how I create COM object for only one menu item. MyContextGUID is
GUID for my item.

   TComObjectFactory.Create( ComServer, TMyContextMenu, MyContextGUID,
'', 'My Windows Shell Context Menu Extension', ciMultiInstance );

So If I add another Item, it would have GUID MyContextGUID_2.

Well, I managed to add two items, but as you can see (in code above)
only GUID of the first item is used. Is this OK.

So in general I would have to:
- create several menu items and GUIDs
- create some keys in registry (ShelEx\GUID1, ShellEx\GUID2, ....)
- create COM object with GUID1

Thanks for your reply,

Damjan



Relevant Pages

  • Context Menu - Shell Extension
    ... So far I learned how to add an arbitrary number of Menu Items to Context ... I made a little editor for customizing context menu. ... but all context menu items work on sam file type. ... I guess each menu item should have it's own GUID. ...
    (comp.lang.pascal.delphi.misc)
  • Re: MOSS 2007 - search service error
    ... Context: Application 'guid here' ... The filename or extension is too long. ...
    (microsoft.public.sharepoint.portalserver)
  • Re: Shell Extension - Context Menu and GUID
    ... > I made a simple shell extension program, which adds custom item in ... > context menu. ... *have* read the documentation for IContextMenu, ... Each shell-extension COM object gets its own GUID. ...
    (alt.comp.lang.borland-delphi)
  • Error -2147319765
    ... this context. ... As a side note I tried calling GetRecordInfoFromGuids() ... initially using __uuidofas the fifth argument but the compiler ... so I packed my GUID into a GUID struct and passed that. ...
    (microsoft.public.vc.atl)