|
SafeArrayGetUBound
psa, nDim, plUbound)
SAFEARRAY FAR* psa
unsigned int nDim
long FAR* plUbound
Returns the upper 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 upper bound.
plUbound
Pointer to the location to return the upper bound.
Return Value
The SCODE obtained from the returned HRESULT is one of the following:
SCODE
| 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 = SafeArrayGetUBound(psa, 1, &lBound);
if(FAILED(hresult))
goto LError0;
.
. // Code omitted
.
LError0:;
penum->Release();
return hresult;
}
Related LinksSoftware for Delphi and C++ Builder developers Software for Visual Studio .NET developers Software for Visual Basic 6 developers Delphi Tips&Tricks
MegaDetailed.NET
TMS Scripter Studio Pro components for Delphi/C++Builder
More Online Helps Win32 Programmer's Reference (win32.hlp) Win32 Multimedia Programmer's Reference (mmedia.hlp) Microsoft Windows Pen API Programmer's Reference (penapi.hlp) Microsoft Windows Sockets 2 Reference (sock2.hlp) Microsoft Windows Telephony API (TAPI) Programmer's Reference (sock2.hlp) Unix Manual Pages
|