Share via


_XRValueCollectionBaseT.Insert(int,XRValue *) (Compact 2013)

3/28/2014

This method inserts an XRValue object into the collection at the specified index.

Syntax

HRESULT STDMETHODCALLTYPE Insert(
int nIndex,
XRValue * pValue)

Parameters

  • nIndex
    [in] The index location at which 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 is not valid.

Remarks

The index position at the beginning of the collection is 0 (zero).

This method updates the current version of the collection, which is stored in m_nVersion.

If nIndex is equal to the value that _XRValueCollectionBaseT.GetCount(int *) retrieves, the object is added to the end of the collection.

When an XRValue object is inserted into the collection, the subsequent objects are moved to the next indexed position.

Requirements

Header

XRCollection.h

See Also

Reference

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