Share via


_XRValueCollectionBaseT.Add(XRValue *) (Compact 2013)

3/28/2014

This method adds an XRValue object to the end of the collection.

Syntax

HRESULT STDMETHODCALLTYPE Add(
XRValue * pValue)

Parameters

  • pValue
    [in] Pointer to an XRValue object to add to the collection.

Return Value

The following table shows the possible return values.

Value

Description

S_OK

The method succeeded.

E_INVALIDARG

An error occurred when inserting the object at the end of the collection.

E_POINTER

The pValue parameter is not valid.

Remarks

Use this method to add a data source object to the collection of data source values. To convert a data source object to an XRValue, you can use XRObject<Base>. Or you can create a new XRValue object to encapsulate your data source object, and call XRValue::SetValue(IXRPropertyBag, bool).

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

Requirements

Header

XRCollection.h

See Also

Reference

_XRValueCollectionBaseT<IFace,ItemType,ItemComparer,ItemConverter,ItemLifeManager>
_XRValueCollectionBaseT.Insert(int,XRValue *)
_XRValueCollectionBaseT.Contains(XRValue *,bool *)