Creates a safe array descriptor for an array of any valid VT type, including VT_RECORD without allocating the array data.
unsigned int cDims,
The variant type.
The number of dimensions of the array.
Points to a location in which to store the created array descriptor.
The return value obtained from the returned HRESULT is one of the following.
The argument psa was not a valid safe array descriptor.
Since SafeArrayAllocDescriptor does not take a VARTYPE, it is not possible to use it to create the safe array descriptor for an array of records. The SafeArrayAllocDescriptorEx is used to allocate a safe array descriptor for an array of records of the given dimensions.