SafeArrayGetDim

SafeArrayGetDim function

Gets the number of dimensions in the array.

Syntax


UINT SafeArrayGetDim(
  _In_ SAFEARRAY *psa
);

Parameters

psa [in]

An array descriptor created by SafeArrayCreate.

Return value

The number of dimensions in the array.

Examples


HRESULT
CEnumPoint::Create(SAFEARRAY * psa, CEnumPoint ** ppenum)
{
   long lBound;
   HRESULT hresult;
   CEnumPoint * penum;

   // Verify that the SafeArray is the proper shape.
   if(SafeArrayGetDim(psa) != 1)
      return E_INVALIDARG;

   // Code omitted here for brevity.

}

Requirements

Header

OleAuto.h

Library

OleAut32.lib

DLL

OleAut32.dll

 

 

Show:
© 2016 Microsoft