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.

SafeArrayGetLBound function

Gets the lower bound for any dimension of the specified safe array.

Syntax


HRESULT SafeArrayGetLBound(
  _In_  SAFEARRAY *psa,
  _In_  UINT      nDim,
  _Out_ LONG      *plLbound
);

Parameters

psa [in]

An array descriptor created by SafeArrayCreate.

nDim [in]

The array dimension for which to get the lower bound.

plLbound [out]

The lower bound.

Return value

This function can return one of these values.

Return codeDescription
S_OK

Success.

E_INVALIDARG

One of the arguments is not valid.

DISP_E_BADINDEX

The specified index is out of bounds.

 

Examples


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


   // Verify that the SafeArray is the proper shape.
   hresult = SafeArrayGetLBound(psa, 1, &lBound);
   if(FAILED(hresult))
      return hresult;

   // Code omitted here for brevity.
}

Requirements

Header

OleAuto.h

Library

OleAut32.lib

DLL

OleAut32.dll

 

 

Show:
© 2016 Microsoft