IResultData::InsertItem method (mmc.h)

The IResultData::InsertItem method enables the snap-in to add a single new item to the result pane view.

Syntax

HRESULT InsertItem(
  [in, out] LPRESULTDATAITEM item
);

Parameters

[in, out] item

A pointer to a RESULTDATAITEM structure that contains information about the item to be added.

After the item is inserted, a unique identifier (an item ID) is assigned to it by MMC and returned through the itemID member of the structure pointed to by the item parameter. Be aware that the itemID value is the HRESULTITEM handle of the inserted item. The snap-in should store this value in order to later manipulate the inserted item by calling methods such as IResultData::GetItem.

If this identifier is not stored, it can be looked up using IResultData::FindItemByLParam.

Return value

This method can return one of these values.

Remarks

The mask and all appropriate associated fields in the RESULTDATAITEM structure should be filled out. Subitems cannot be inserted but can be set. The nCol member of the item structure must therefore be zero.

The str member of RESULTDATAITEM must be set to MMC_CALLBACK.

After the item is inserted, a unique identifier (an item ID) is assigned to it by MMC and returned through the itemID member of the structure pointed to by the item parameter. Be aware that the itemID value is the HRESULTITEM handle of the inserted item. The snap-in should store this value in order to later manipulate the inserted item by calling methods such as IResultData::GetItem.

If this identifier is not stored, it can be identified using IResultData::FindItemByLParam.

This method does not support virtual lists.

Requirements

   
Minimum supported client Windows Vista
Minimum supported server Windows Server 2008
Target Platform Windows
Header mmc.h
DLL Mmcndmgr.dll

See also

IResultData

IResultData2