IExtendContextMenu::Command

[This is preliminary documentation and subject to change.]

If one of the items you added to the context menu by IExtendContextMenu::AddMenuItems is subsequently selected, MMC calls Command with the command ID you specified and another pointer to the same IDataObject interface.

HRESULT Command(
  long lCommandID,           // Menu item command identifier
  LPDATAOBJECT piDataObject  // Data object pointer
);
 

Parameters

lCommandID
[in] Specifies the command identifier of the menu item.
piDataObject
[in] Pointer to the IDataObject interface on the object whose context menu was displayed.

Return Values

S_OK
The context menu item was successfully selected.
E_UNEXPECTED
An unexpected error occurred.

See Also

IContextMenuCallback, IDataObject, IExtendContextMenu