RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
VarUtils.SafeArrayGetElement Function

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

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

Use SafeArrayGetElement to obtain the element found at the position specified through the Indices parameter, in the safe array given through VarArray.  

If retrieving the element is successful, SafeArrayGetElement stores the element in the Data parameter.

Note: SafeArrayGetElement also locks and unlocks the safe array before and after retrieving 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!