Function Reference


_SafeArrayAddRef

Increments the reference count of a SafeArray.

_SafeArrayAddRef($pSafeArray, ByRef $ppvData)

Parameters

$pSafeArray Pointer to the SafeArray.
$ppvData [out] Pointer to the SafeArray's data.

Return Value

Success: 0 (S_OK).
Failure: Non-zero HRESULT and sets @error:
1 - Invalid SafeArray pointer.
2 - DllCall failure.

Remarks

Increments the reference count of the SafeArray and retrieves a pointer to its data. The caller must call
_SafeArrayRelease to decrement the reference count. Use with caution as AutoIt typically manages SafeArray lifetime.

Related

_SafeArrayRelease, _SafeArrayAccessData