Function Reference


_SafeArrayGetElement

Retrieves an element from a SafeArray using the specified indices.

_SafeArrayGetElement($pSafeArray, ByRef $aIndices)

Parameters

$pSafeArray Pointer to the SafeArray.
$aIndices Array of indices for accessing the element (AutoIt order).

Return Value

Success: The value of the element (converted to AutoIt type).
Failure: 0 and sets @error:
1 - Invalid SafeArray pointer.
2 - Invalid dimensions or SafeArray access error.
3 - Mismatch between indices and SafeArray dimensions.
4 - Failed to retrieve element (DllCall failure).
5 - SafeArray does not contain VARIANT elements.

Remarks

Uses AutoIt dimension order. Only supports SafeArrays of type VT_VARIANT.

Related

_SafeArrayPutElement, _CreateSafeArrayIndices