SafeArrayGetUBound function

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

Syntax

HRESULT SafeArrayGetUBound(
  SAFEARRAY *psa,
  UINT      nDim,
  LONG      *plUbound
);

Parameters

psa

An array descriptor created by SafeArrayCreate.

nDim

The array dimension for which to get the upper bound.

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

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