Function Reference


_SafeArrayAllocDescriptorEx

Allocates a SafeArray descriptor with a specified VARIANT type and number of dimensions.

_SafeArrayAllocDescriptorEx($vType, $cDims)

Parameters

$vType VARIANT type for the SafeArray elements (e.g., $VT_VARIANT, $VT_I4).
$cDims Number of dimensions for the SafeArray descriptor.

Return Value

Success: Pointer to the SafeArray descriptor.
Failure: 0 and sets @error:
1 - Invalid number of dimensions (<= 0 or > 5).
2 - Invalid VARIANT type.
3 - DllCall failure.

Remarks

The descriptor must be initialized with bounds and data. Use _SafeArrayDestroyDescriptor to free it.

Related

_SafeArrayAllocDescriptor, _SafeArrayDestroyDescriptor, _SafeArrayAllocData