SafeArrayAllocDescriptorEx Function

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

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

vt

The variant type.

cDims

The number of dimensions of the array.

ppsaOut

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.

Return value

Meaning

S_OK

Success.

E_INVALIDARG

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.

Show:
© 2015 Microsoft