ole2disp: Implement SafeArrayLock()/SafeArrayUnlock().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
26c9bd9f15
commit
2ef42bd946
|
@ -107,6 +107,40 @@ USHORT WINAPI SafeArrayGetElemsize16(SAFEARRAY16 *sa)
|
|||
return sa->cbElements;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* SafeArrayLock [OLE2DISP.21]
|
||||
*/
|
||||
HRESULT WINAPI SafeArrayLock16(SAFEARRAY16 *sa)
|
||||
{
|
||||
TRACE("(%p)\n", sa);
|
||||
|
||||
if (!sa)
|
||||
return E_INVALIDARG16;
|
||||
|
||||
if (sa->cLocks == 0xffff)
|
||||
return E_UNEXPECTED;
|
||||
|
||||
sa->cLocks++;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* SafeArrayUnlock [OLE2DISP.22]
|
||||
*/
|
||||
HRESULT WINAPI SafeArrayUnlock16(SAFEARRAY16 *sa)
|
||||
{
|
||||
TRACE("(%p)\n", sa);
|
||||
|
||||
if (!sa)
|
||||
return E_INVALIDARG16;
|
||||
|
||||
if (sa->cLocks == 0)
|
||||
return E_UNEXPECTED;
|
||||
|
||||
sa->cLocks--;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* SafeArrayAllocDescriptor [OLE2DISP.38]
|
||||
*/
|
||||
|
|
|
@ -18,8 +18,8 @@
|
|||
18 pascal -ret16 SafeArrayGetElemsize(ptr) SafeArrayGetElemsize16
|
||||
19 stub SAFEARRAYGETUBOUND
|
||||
20 stub SAFEARRAYGETLBOUND
|
||||
21 stub SAFEARRAYLOCK
|
||||
22 stub SAFEARRAYUNLOCK
|
||||
21 pascal SafeArrayLock(ptr) SafeArrayLock16
|
||||
22 pascal SafeArrayUnlock(ptr) SafeArrayUnlock16
|
||||
23 stub SAFEARRAYACCESSDATA
|
||||
24 stub SAFEARRAYUNACCESSDATA
|
||||
25 stub SAFEARRAYGETELEMENT
|
||||
|
|
Loading…
Reference in New Issue