SafeArrayGetLBound

HRESULT SafeArrayGetLBound( 
  SAFEARRAY FAR*  psa, 
  unsigned int  nDim,  
  long FAR*  plLbound  
);
 

Returns the lower bound for any dimension of a safe array.

Parameters

psa
Pointer to an array descriptor created by SafeArrayCreate.
nDim
The array dimension for which to get the lower bound.
plLbound
Pointer to the location to return the lower bound.

Return Value

The return value obtained from the returned HRESULT is one of the following.

Return value Meaning
S_OK Success.
DISP_E_BADINDEX The specified index is out of bounds.
E_INVALIDARG One of the arguments is invalid.

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.
    hresult = SafeArrayGetLBound(psa, 1, &lBound);
    if(FAILED(hresult))
        return hresult;

    // 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.