RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
VarUtils.SafeArrayPutElement Function

Sets the element at the specified position in the given safe array.

Pascal
function SafeArrayPutElement(VarArray: PVarArray; Indices: PVarArrayCoorArray; const Data: Pointer): HRESULT; stdcall;
C++
__stdcall HRESULT SafeArrayPutElement(PVarArray VarArray, PVarArrayCoorArray Indices, const void * Data);

Use SafeArrayPutElement to change the value of the element found at the position specified through the Indices parameter, in the safe array given through VarArray. The new value is stored in the Data parameter.

Note: SafeArrayPutElement also locks and unlocks the safe array before and after setting the element, using the SafeArrayLock and SafeArrayUnlock routines.
 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!