none
Need to write a shell extension RRS feed

  • Question

  • Hello All,

    I need to write a basic shell extension. I have seen lots of these articles, but many of them have to do with C# - 4..

    I need to use VS2008 and C# 3.0.. are there any useful links.

    Can someone pls help me;

    Thanks
    Sandeep

    Pls help me if its beneficial to write shell extension in VS2010 and .NET 4.0 or earlier version...

     I am right now following the link in code project

    http://www.codeproject.com/KB/shell/csdoesshell1.aspx

     

    Please let me know if this is the the right approach or should i use COM or other stuffs..
    Pls help me..

    Tuesday, November 16, 2010 9:12 AM

Answers

  •  

    Hi SandepKU,

     

    Our team has a code sample project called Microsoft All-In-One Code Framework. Its code samples target programming tasks that are frequently asked by developers. The team is working on a series of .NET 4 managed Shell extension code samples for Context Menu Handler, Property Sheet Handler, Icon handler, Data handler, Drop handler, Drag-and-drop handler, Thumbnail Handler, Icon Handler, Icon Overlay Handler, and so on. In the September release of the project, they provided the first batch of managed shell extension samples. You can download them from http://1code.codeplex.com/releases/. More will be provided in the future releases.

     

    CSShellExtContextMenuHandler  Shell context menu handler (C#)

    VBShellExtContextMenuHandler  Shell context menu handler (VB.NET)

    CppShellExtContextMenuHandler  Shell context menu handler (C++) 

     


    Sincerely,
    Eric
    MSDN Subscriber Support in Forum
    If you have any feedback of our support, please contact msdnmg@microsoft.com.
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    • Marked as answer by SandepKU Monday, November 29, 2010 4:49 AM
    Wednesday, November 17, 2010 6:27 AM

All replies

  • Writing shell extension (or any in-process plugin) in .Net is not supported until .Net 4.0. Prior to CLR 4.0 you can only load one version of CLR into a process, so if some other plugin loaded CLR 1 and you try to run .Net 2-3.5 code, your plugin would crash.

    The following is signature, not part of post
    Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
    Visual C++ MVP
    Wednesday, November 17, 2010 1:20 AM
  •  

    Hi SandepKU,

     

    Our team has a code sample project called Microsoft All-In-One Code Framework. Its code samples target programming tasks that are frequently asked by developers. The team is working on a series of .NET 4 managed Shell extension code samples for Context Menu Handler, Property Sheet Handler, Icon handler, Data handler, Drop handler, Drag-and-drop handler, Thumbnail Handler, Icon Handler, Icon Overlay Handler, and so on. In the September release of the project, they provided the first batch of managed shell extension samples. You can download them from http://1code.codeplex.com/releases/. More will be provided in the future releases.

     

    CSShellExtContextMenuHandler  Shell context menu handler (C#)

    VBShellExtContextMenuHandler  Shell context menu handler (VB.NET)

    CppShellExtContextMenuHandler  Shell context menu handler (C++) 

     


    Sincerely,
    Eric
    MSDN Subscriber Support in Forum
    If you have any feedback of our support, please contact msdnmg@microsoft.com.
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    • Marked as answer by SandepKU Monday, November 29, 2010 4:49 AM
    Wednesday, November 17, 2010 6:27 AM
  • Hello Eryang,

    I have downloaded the CSShellExtContextMenuHandler.

    It was the same thing which I was looking for.

    I am right now going through the code.

    It would be helpful, if you could provide a way to modify the code, such that, the shell extension context menu shows up only on .xls files.

    Can u pls help me with my requiremetn, where in I need to invoke a external program. How do I store the full path of the external program to be invoked. IS there a way to use config file or should I make use of Registry by storing a new key.

    Since I do not know COM, i am finding it hard to modify code.. pls help

    Thanks

    Sandeep

    Thursday, November 18, 2010 4:43 AM
  • Hello Eryang,

    I am trying to use the CSSShellExtensionContextMenuHandler.

    Now I want 2 context menu.

    I copied the classes into a different project and changed the GUID.

    I am not able to find the newly created thign on right click. can u pls help.

    where i am going wrong.

    Thanks
    Sandeep

    Friday, November 19, 2010 4:47 AM
  • Hi Sandeep,

    May I know does CSSShellExtensionContextMenuHandler sample works? if so, what changes you made (beside change the GUID) when copy the class into a different project?


    Sincerely,
    Eric
    MSDN Subscriber Support in Forum
    If you have any feedback of our support, please contact msdnmg@microsoft.com.
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Wednesday, November 24, 2010 5:42 AM
  • Hello Eryang,

    I modified the Guid.. so now have 2 projects which create 2 different context menu's

    i am able to get it up and running. thanks.

    Sandeep

    Friday, November 26, 2010 4:36 PM
  •  

     

    Glad to see that you got it resolved, by the way, please remember to mark the replies as answers if they help and unmark them if they provide no help. This can be beneficial to other community members reading the thread.


    Sincerely,
    Eric
    MSDN Subscriber Support in Forum
    If you have any feedback of our support, please contact msdnmg@microsoft.com.
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Saturday, November 27, 2010 2:43 AM