SafeArrayGetUBound function (oleauto.h)

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

Syntax

HRESULT SafeArrayGetUBound(
  [in]  SAFEARRAY *psa,
  [in]  UINT      nDim,
  [out] LONG      *plUbound
);

Parameters

[in] psa

An array descriptor created by SafeArrayCreate.

[in] nDim

The array dimension for which to get the upper bound.

[out] plUbound

The upper bound.

Return value

This function can return one of these values.

Return code Description
S_OK
Success.
DISP_E_BADINDEX
The specified index is out of bounds.
DISP_E_OVERFLOW
Overflow occurred while computing the upper bound.
E_INVALIDARG
One of the arguments is not valid.

Requirements

Requirement Value
Target Platform Windows
Header oleauto.h
Library OleAut32.lib
DLL OleAut32.dll