Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

IContextMenuProvider::AddPrimaryExtensionItems method

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

Syntax


HRESULT AddPrimaryExtensionItems(
  [in] LPUNKNOWN    piExtension,
  [in] LPDATAOBJECT piDataObject
);

Parameters

piExtension [in]

A pointer to an IUnknown interface on the object that implements the IExtendContextMenu interface for the primary extension.

piDataObject [in]

A pointer to the IDataObject interface on the object whose context menu is extended.

Return value

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.

Requirements

Minimum supported client

Windows Vista

Minimum supported server

Windows Server 2008

Header

Mmc.h

DLL

Mmcndmgr.dll

See also

IContextMenuCallback
IContextMenuProvider
IExtendContextMenu

 

 

Show: