IWEExtendContextMenu::AddContextMenuItems

The IWEExtendContextMenu::AddContextMenuItems method adds items to a Cluster Administrator context menu.

HRESULT AddContextMenuItems(
  IUnknown * piData,                  
  IWCContextMenuCallback *piCallback  
);
 

Parameters

piData
[in] Pointer to an IUnknown interface implementation that can be used to obtain pointers to interface implementations relating to objects on the Cluster Administrator context menu. When Cluster Administrator uses piData to call IUnknown::QueryInterface, it should be able to retrieve a pointer to these interfaces:

IGetClusterUIInfo

IGetClusterDataInfo

IGetClusterObjectInfo

Depending on the type of object related to the context menu, an extension should also make a pointer available to one of these interfaces:

IGetClusterNodeInfo, if a node is being extended.

IGetClusterGroupInfo, if a group is being extended.

IGetClusterResourceInfo, if a resource is being extended.

piCallback
[in] Pointer to an IWCContextMenuCallback interface implementation for adding new items to the Cluster Administrator context menu.

Return Values

NOERROR
The operation was successful.
E_INVALIDARG
One or both of the parameters was invalid.
E_FAIL
There was an error adding the context menu item.
E_NOTIMPL
The Cluster Administrator extension does not implement this method.

If AddContextMenuItems is unsuccessful, it can also return an OLE-defined error value.

Remarks

Cluster Administrator calls an extension's IWEExtendContextMenu::AddContextMenuItems method to extend its context menu for a node, group, resource, or resource type.

Notes to Implementers

    For each item to be added to the context menu
  1. Call the QueryInterface method of the IUnknown interface pointed to by piData to retrieve a pointer to an interface that can provide information about the object associated with the menu item.
  2. Call IWCContextMenuCallback::AddExtensionMenuItem using the piCallback pointer to add the item to the menu.

QuickInfo

  Version: Use Windows NT Server Enterprise Edition 4.0.
  Windows CE: Unsupported.
  Header: Declared in cluadmex.h.