SafeArrayPutElement

psa, rgIndices, pvData)
SAFEARRAY FAR* psa
long FAR* rgIndices
void FAR* pvData

Assigns a single element into the array.

Parameters

psa

Pointer to an array descriptor created by SafeArrayCreate.

rgIndices

Pointer to a vector of indexes for each dimension of the array. The rightmost (least significant) dimension is rgIndices[0]. The leftmost dimension is stored at rgIndices[psa->cDims pics/OLE00090001.gif 1].

pvData

Pointer to the data to assign to the array. VT_DISPATCH, VT_UNKNOWN, and VT_BSTR variant types are pointers and don't require another level of indirection.

Comments

This function automatically calls SafeArrayLock and SafeArrayUnlock before and after assigning the element. If the data element is a string, object, or variant, the function copies it correctly. If the existing element is a string, object or variant, it is cleared correctly.

Note that you can have multiple locks on an array, so you can put elements into an array while the array is locked by other operations.

Software for developers
Delphi Components
.Net Components
Software for Android Developers
More information resources
MegaDetailed.Net
Unix Manual Pages
Delphi Examples
Databases for Amazon shops developers
Amazon Categories Database
Browse Nodes Database