In addition to the caveats that were mentioned regarding the implementation of shell extensions in managed code, you basically need to do the following:
First, create a COM component in C # that implements the IShellExtInit IContextMenu interfaces. How to create COM components in C # is described here . How to implement the necessary interfaces is described in this article . While the description is intended to be implemented in C ++, you can apply this knowledge to your version of C #.
Your COM component will have a GUID called a class identifier or CLSID. You need to register this identifier with the file type as a shell extension of the context menu:
HKEY_CLASSES_ROOT\.eic\ShellEx\ContextMenuHandlers\MyShellExt (Default) -> {YOUR-COMPONENTS-CLSID}
Also make sure that you have registered your component correctly, as described in the C # COM tutorial. You should find it in the registry under
HKEY_CLASSES_ROOT\CLSID\{YOUR-COMPONENTS-CLSID} InprocServer32 (Default) -> C:\WINDOWS\system32\mscoree.dll Class -> YourImplClass assembly -> YourAssembly, version=..., Culture=neutral, PublicKey=... ...
Good luck ...
source share