IContextMenuCallback

[This is preliminary documentation and subject to change.]

The IContextMenuCallback interface is used to add menu items to a context menu.

When to Implement

You do not implement this interface. It is implemented by the Microsoft Management Console's node manager.

When to Use

There are two situations in which you use IContextMenuCallback. The first is during a call to IExtendContextMenu::AddMenuItems (implemented by the snap-in). Use IContextMenuCallback::AddItem to add items to the context menu for an item you own in the result list view, in the scope pane, or for an item you are extending as a third-party context menu extension. If one of the items you add is selected, you are notified by IExtendContextMenu::Command.

The second situation in which you use this interface is when you create a context menu yourself using IContextMenuProvider. In this case, you call IContextMenuCallback::AddItem after calling IContextMenuProvider::EmptyMenuList and before calling IContextMenuProvider::ShowContextMenu.

Methods in Vtable Order

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

IContextMenuCallback Method Description
AddItem Adds one item to the context menu.