IContextMenuCallback.AddItem(CONTEXTMENUITEM) Method

Definition

Adds a single item to a shortcut menu.

This API supports the product infrastructure and is not intended to be used directly from your code.

C#
public int AddItem(ref Microsoft.Aspnet.Snapin.CONTEXTMENUITEM pItem);

Parameters

pItem
CONTEXTMENUITEM

A pointer to a CONTEXTMENUITEM with the item to add.

Returns

Return Value Description
S_OK pItem was added successfully.
E_UNEXPECTED An unexpected error occurred.
E_POINTER pItem is null (Nothing in Visual Basic).
E_INVALIDARG One or more of the CONTEXTMENUITEM members contains one or more values that are not valid or the values cause a known error.

Remarks

For more information about programming with the IContextMenuCallback interface and the Microsoft Management Console (MMC), see the MMC Programmer's Guide.

Applies to

Product Versies
.NET Framework 2.0, 3.0, 3.5