I am a novice .Net 2.0 and 3.5 developer. I want to create an application that creates a context menu when a file is right clicked on in Vista. After the right click–I think I can figure out the rest, but I don’t know the technique to get access to the Vista API.
FOLLOW-UP:
As I have been reading some of the info that folks have responded with, I have found that I am going overkill here with the shell extensions. I think I can keep this project a lot simpler if I just call my app and pass the filename as a parameter. This would still require my app to come up in explorer’s context menu when files with certain extensions are right clicked on. How do I go about doing this?
With the risk of sounding unhelpful, I’d recommend against this in .Net 2.0 or 3.5. As Brian said the thing you’re trying to implement is a shell extension. These are implemented as libraries which the Vista shell loads.
While there are several tutorials around the web which give instructions on implementing these in .Net 2.0 or such few of these mention how bad idea this is. If you make the Vista shell load a .Net shell extension it is forced to load the whole .Net CLR which your shell extension requires. What makes this even worse is that you can load only one version of the full .Net CLR in one process. So if you have a shell extension that requires .Net 1.0 CLR and Vista has loaded this, it cannot load the 2.0 CLR your shell extension requires.
Also there are some Stack Overflow articles already discussing this.
Some information on implementing a shell extension in unmanaged C++ (KBCafe PDF, couldn’t find a simple html link)