Platform SDK: Active Directory, ADSI, and Directory Services |
You can add context menus to the existing context menus for a particular object class within the Microsoft® Windows® shell or Active Directory™ administrative snap-ins. Context menu items may be either COM objects, which are activated using the standard COM instance creation methods, or an application that is invoked using the standard ShellExecute function.
For example, you can implement a context menu COM object that adds menu items to the context menu of the contact class. When a user views a contact object, your context menu items are displayed along with other context menu items in the contact context menu.
To extend context menus with context menu items from a COM object
For the Windows shell or Active Directory administrative snap-ins to recognize your context menu, you must add a value for your context menu COM object in the adminContextMenu and/or shellContextMenu property of the display specifier for the class whose context menu you want to extend. Note that you can register the same context menu COM object for more than one class.
Note that registration is per locale. If the context menu COM object is specific to a certain locale, it should be registered in a displaySpecifier in the locale container that it applies to. If it applies to all locales, it should be added to the appropriate displaySpecifier (that is, the one that represents the class that should get the context menu extension) in all locale containers.
To extend context menus with context menu items that launch an application