Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

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:
© 2017 Microsoft