SafeArrayGetDim

UINT SafeArrayGetDim( 
  SAFEARRAY FAR*  psa  
);
 

Returns the number of dimensions in the array.

Parameter

psa
Pointer to an array descriptor created by SafeArrayCreate.

Return Value

Returns the number of dimensions in the array.

Example

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

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

    // Code omitted here for brevity.

}

QuickInfo

  Windows NT: Use version 3.1 and later.
  Windows: Use Windows 95 and later.
  Header: Declared in oleauto.h.
  Import Library: Link with oleaut32.lib.