IContextMenuProvider::AddPrimaryExtensionItems

[This is preliminary documentation and subject to change.]

AddPrimaryExtensionItems enables one specific extension to add items to the insertion points defined for this context menu.

HRESULT AddPrimaryExtensionItems(
  LPUNKNOWN piExtension,  // Pointer to an IUnknown interface
  LPDATAOBJECT piDataObject  // Pointer to a data object
);
 

Parameters

piExtension
[in] Pointer to an IUnknown interface on the object that implements the IExtendContextMenu interface for the primary extension.
piDataObject
[in] Pointer to the IDataObject interface on the object whose context menu is being extended.

Return Values

S_OK
The menu was successfully extended with zero or more menu items.
S_FALSE
The context menu has already been extended.
E_UNEXPECTED
An unexpected error occurred.
E_INVALIDARG
At least one parameter is NULL

Other values can be returned, depending on the implementation of IExtendContextMenu::AddMenuItems by the specified snap-in.

See Also

IContextMenuCallback, IContextMenuProvider, IExtendContextMenu