Commit a9686b00 authored by Gijs Vermeulen's avatar Gijs Vermeulen Committed by Alexandre Julliard

ole2disp.dll16: Implement SafeArrayGet[UBound|LBound].

parent dcd96f5f
......@@ -117,6 +117,42 @@ USHORT WINAPI SafeArrayGetElemsize16(SAFEARRAY16 *sa)
}
/******************************************************************************
* SafeArrayGetUBound [OLE2DISP.19]
*/
HRESULT WINAPI SafeArrayGetUBound16(SAFEARRAY16 *sa, UINT16 dim, LONG *ubound)
{
TRACE("(%p, %u, %p)\n", sa, dim, ubound);
if (!sa)
return E_INVALIDARG16;
if (!dim || dim > sa->cDims)
return DISP_E_BADINDEX;
*ubound = sa->rgsabound[sa->cDims - dim].lLbound + sa->rgsabound[sa->cDims - dim].cElements - 1;
return S_OK;
}
/******************************************************************************
* SafeArrayGetLBound [OLE2DISP.20]
*/
HRESULT WINAPI SafeArrayGetLBound16(SAFEARRAY16 *sa, UINT16 dim, LONG *lbound)
{
TRACE("(%p, %u, %p)\n", sa, dim, lbound);
if (!sa)
return E_INVALIDARG16;
if (!dim || dim > sa->cDims)
return DISP_E_BADINDEX;
*lbound = sa->rgsabound[sa->cDims - dim].lLbound;
return S_OK;
}
/******************************************************************************
* SafeArrayLock [OLE2DISP.21]
*/
HRESULT WINAPI SafeArrayLock16(SAFEARRAY16 *sa)
......
......@@ -16,8 +16,8 @@
16 stub SAFEARRAYDESTROY
17 pascal -ret16 SafeArrayGetDim(ptr) SafeArrayGetDim16
18 pascal -ret16 SafeArrayGetElemsize(ptr) SafeArrayGetElemsize16
19 stub SAFEARRAYGETUBOUND
20 stub SAFEARRAYGETLBOUND
19 pascal SafeArrayGetUBound(ptr word ptr) SafeArrayGetUBound16
20 pascal SafeArrayGetLBound(ptr word ptr) SafeArrayGetLBound16
21 pascal SafeArrayLock(ptr) SafeArrayLock16
22 pascal SafeArrayUnlock(ptr) SafeArrayUnlock16
23 pascal SafeArrayAccessData(ptr ptr) SafeArrayAccessData16
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment