none
Right click menu of a drive RRS feed

  • Question

  • How can i add an entry to the right click menu of a certain drive?
    How can i do it for all of my drives?

    بن بست معنا ندارد یا راهی خواهیم یافت یا راهی خواهیم ساخت Pleasure can be silence , After a deafening din
    Saturday, September 19, 2009 7:39 PM

Answers

  • That requires a shell contextmenu extension handler.  Writing those in C# is strongly discouraged by Microsoft because of the CLR version injection problem, .NET 4.0 will bring relieve.  Even then, the COM code required is very awkward in C#.  One of the reasons the .NET framework has practically no support for the shell. 

    Here is a guide that discusses how to write extension handlers in C/C++.

    Hans Passant.
    • Marked as answer by AKGMA Tuesday, September 29, 2009 1:59 PM
    Saturday, September 19, 2009 8:57 PM
    Moderator
  • I saw this and replaced "JpegFile" in the sample with "Drive"
    بن بست معنا ندارد یا راهی خواهیم یافت یا راهی خواهیم ساخت Pleasure can be silence , After a deafening din
    • Marked as answer by AKGMA Tuesday, September 29, 2009 2:00 PM
    Tuesday, September 29, 2009 2:00 PM

All replies

  • That requires a shell contextmenu extension handler.  Writing those in C# is strongly discouraged by Microsoft because of the CLR version injection problem, .NET 4.0 will bring relieve.  Even then, the COM code required is very awkward in C#.  One of the reasons the .NET framework has practically no support for the shell. 

    Here is a guide that discusses how to write extension handlers in C/C++.

    Hans Passant.
    • Marked as answer by AKGMA Tuesday, September 29, 2009 1:59 PM
    Saturday, September 19, 2009 8:57 PM
    Moderator
  • I have actually seen that and this
    but what should i use instead of Jpegfile in the sample provided by codeproject to represent a drive?

    بن بست معنا ندارد یا راهی خواهیم یافت یا راهی خواهیم ساخت Pleasure can be silence , After a deafening din
    Tuesday, September 22, 2009 5:50 PM
  • I saw this and replaced "JpegFile" in the sample with "Drive"
    بن بست معنا ندارد یا راهی خواهیم یافت یا راهی خواهیم ساخت Pleasure can be silence , After a deafening din
    • Marked as answer by AKGMA Tuesday, September 29, 2009 2:00 PM
    Tuesday, September 29, 2009 2:00 PM