Share via


_XRValueCollectionBaseT.InsertItemImpl(int,XRValue *) (Compact 7)

3/12/2014

This protected method implements collection operations that add items to the collection.

Note

This method is reserved. In a derived class, call _XRValueCollectionBaseT.Insert(int,XRValue *) instead of calling InsertItemImpl.

Syntax

HRESULT STDMETHODCALLTYPE InsertItemImpl(
int nIndex,
XRValue * pValue)

Parameters

  • nIndex
    [in] Index of the location in the collection to insert the XRValue object.
  • pValue
    [in] Pointer to an XRValue object to insert into the collection.

Return Value

The following table shows the possible return values.

Value Description

S_OK

The method succeeded.

E_FAIL

The method was not successful.

E_INVALIDARG

The index position is not valid.

E_POINTER

The pValue parameter is not valid.

Remarks

You can override this method in a derived class, for example to process an input parameter of an item type different from XRValue.

To add items to the _XRValueCollectionBaseT<IFace,ItemType,ItemComparer,ItemConverter,ItemLifeManager> collection, call the _XRValueCollectionBaseT.Add(XRValue *) or _XRValueCollectionBaseT.Insert(int,XRValue *) methods, which invoke InsertItemImpl.

Requirements

Header

XRCollection.h

See Also

Reference

_XRValueCollectionBaseT<IFace,ItemType,ItemComparer,ItemConverter,ItemLifeManager>