IExtendContextMenu

[This is preliminary documentation and subject to change.]

The IExtendContextMenu interface enables an extension to add items to an existing context menu. This is how extensions add menu items to the context menus for the objects they insert into the scope pane or list view result pane. This is also how third-party context menu extensions add items to the context menus for items with their registered node types.

When a user right-clicks items that both belong to a snap-in and that are in the scope pane or list view result pane, MMC generates a default context menu, then offers the snap-in that added the item the opportunity to extend the context menu as a primary extension. Then MMC offers all registered and enabled extensions the opportunity to add additional menu items.

When to Implement

You implement this interface as part of your in-process server DLL when the capability to extend a snap-in component's context menus is expected to be necessary.

When to Use

This interface is only called by the Microsoft Management Console.

Methods in Vtable Order

IUnknown Methods Description
QueryInterface Returns pointers to supported interfaces.
AddRef Increments reference count.
Release Decrements reference count.

IExtendContextMenu Methods Description
AddMenuItems Enables the extension to add menu items.
Command Indicates an extension item on a context menu was selected.