IResultData::InsertItem

[This is preliminary documentation and subject to change.]

Enables the snap-in to add a new single item to the result pane view.

HRESULT InsertItem(
  LPRESULTDATAITEM item  // Pointer to a RESULTDATAITEM structure
);
 

Parameters

item
[in, out] Pointer to a RESULTDATAITEM structure containing information about the item to be added.

Return Values

S_OK
The item was successfully inserted.
E_UNEXPECTED
An unexpected error occurred.
E_INVALIDARG
The pItem parameter is NULL.

Remarks

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

After the item is inserted, a unique identifier (an item ID) is assigned to it and returned through the itemID member of the item structure. If this identifier is not stored, it can be looked up using IResultData::FindItemByLParam.

The str member of RESULTDATAITEM must be set to MMC_CALLBACK.

This method does not support virtual lists.

See Also

IResultData