SafeArrayAllocDescriptorEx function

Creates a safe array descriptor for an array of any valid variant type, including VT_RECORD, without allocating the array data.

Syntax

HRESULT SafeArrayAllocDescriptorEx(
  VARTYPE   vt,
  UINT      cDims,
  SAFEARRAY **ppsaOut
);

Parameters

vt

The variant type.

cDims

The number of dimensions in the array.

ppsaOut

The safe array descriptor.

Return value

This function can return one of these values.

Return code Description
S_OK
Success.
E_INVALIDARG
The argument psa was not valid.

Remarks

Because 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.

Requirements

   
Target Platform Windows
Header oleauto.h
Library OleAut32.lib
DLL OleAut32.dll