Function Reference


_SafeArrayCreateVectorEx

Creates a one-dimensional SafeArray with the specified type, bounds, and optional parameter.

_SafeArrayCreateVectorEx($vType, $lLBound, $cElements, $pvExtra)

Parameters

$vType VARIANT type for the SafeArray elements (e.g., $VT_VARIANT, $VT_I4).
$lLBound Lower bound of the SafeArray.
$cElements Number of elements in the SafeArray.
$pvExtra Optional pointer to additional data (typically 0 in AutoIt).

Return Value

Success: Pointer to the created SafeArray.
Failure: 0 and sets @error:
1 - Invalid VARIANT type.
2 - Invalid number of elements (< 0).
3 - DllCall failure.

Remarks

Similar to _SafeArrayCreateVector but allows an optional extra parameter. The caller must destroy it using _SafeArrayDestroy.

Related

_SafeArrayCreateVector, _SafeArrayCreate, _SafeArrayDestroy