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(
  _In_  VARTYPE   vt,
  _In_  UINT      cDims,
  _Out_ SAFEARRAY **ppsaOut
);

Parameters

vt [in]

The variant type.

cDims [in]

The number of dimensions in the array.

ppsaOut [out]

The safe array descriptor.

Return value

This function can return one of these values.

Return codeDescription
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

Header

OleAuto.h

Library

OleAut32.lib

DLL

OleAut32.dll

 

 

Show: