Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

CComSafeArray::SetAt

 

Sets the value of an element in a single-dimensional array.


      HRESULT SetAt(
   LONG lIndex,
   const T& t,
   BOOL bCopy = TRUE
);

lIndex

The index number of the array element to set.

t

The new value of the specified element.

bCopy

Indicates whether a copy of the data should be created. The default value is TRUE.

Returns S_OK on success, or an error HRESULT on failure.

The bCopy flag is taken into account when elements of type BSTR or VARIANT are added to an array. The default value of TRUE ensures that a new copy is made of the data when the element is added to the array.

Requirements

Header: atlsafe.h

Show: