问题
If some one can provide some sample articles on how to create Right Click Menu for Drives.
Here is what needed: The right click menu will contain two additional things, i.e: Connect and Disconnect. Can we make it conditional? I mean for some condition The drive will make the Connect enabled(Ideally when not connected) and when connected it will disable the connect and enable the Disconnect.
回答1:
Here is all the relevant documentation. Basically you want to create a COM object that implements IShellExtInit and IContextMenu. To register it for drives you would add an entry for it under HKEY_CLASSES_ROOT\Drive. If the MSDN documentation is a bit dense there is a detailed walkthrough on CodeProject.
来源:https://stackoverflow.com/questions/3748936/creating-rightclick-menu-for-explorer