Windows apps
Collapse the table of content
Expand the table of content

SafeArrayGetDim Function

Returns the number of dimensions in the array.

UINT SafeArrayGetDim(  
  SAFEARRAY *  psa  
);

psa

Pointer to an array descriptor created by SafeArrayCreate.

Returns the number of dimensions in the array.

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.

}
Show:
© 2017 Microsoft