I’d like to add an item into the right click menu (like TortoiseSVN does, or 7zip etc…)
I’m not sure how to do this or what it is specifically called.
It would be preferable if this option was only available while my program was running.
Use case:
User would select some text on a webpage (or word document or anything on their computer) and right click, select my item from menu and my sub DoSomething(string myString) would run.
EDIT:
I’m currently developing on XP, but I’d like this program to work on Vista/Win7
It depends on where you want the context menu items and for what overall purpose. Most of the answers so far are for context menus in Explorer, but if you want to change a context menu inside of a program as your question states, it becomes much harder and/or impossible.
However, it’s very possible to add context menu items to file types in explorer without shell extensions, it’s possible by registry manipulation or 3rd party utilities, or with COM as others have said.