SafeArrayGetLBound
This function returns the lower bound for any dimension of a safe array.
HRESULT SafeArrayGetLBound(
SAFEARRAY FAR *psa,
unsigned int nDim,
long FAR *plLbound );
Parameters
- psa
Pointer to an array descriptor created by SafeArrayCreate. - nDim
Specifies the array dimension for which to get the lower bound. - plLbound
Pointer to the location to return the lower bound.
Return Values
One of the values obtained from the returned HRESULT and described in the following table is returned.
| Value | Description |
|---|---|
| S_OK | Success. |
| DISP_E_BADINDEX | The specified index is out of bounds. |
| E_INVALIDARG | One of the arguments is invalid. |
Remarks
Passing into this function any invalid and, under some circumstances, NULL pointers will result in unexpected termination of the application.
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.
}
Requirements
| Runs on | Versions | Defined in | Include | Link to |
|---|---|---|---|---|
| Windows CE OS | 2.0 and later | Oleauto.h | Oleaut32.lib |
Note This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.
Last updated on Tuesday, July 13, 2004
© 1992-2000 Microsoft Corporation. All rights reserved.