Commit 1529f082 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

ole2disp: Implement SafeArrayDestroyDescriptor().

parent 6cecd59f
...@@ -67,6 +67,11 @@ static SEGPTR safearray_alloc(ULONG size) ...@@ -67,6 +67,11 @@ static SEGPTR safearray_alloc(ULONG size)
return WOWGlobalAllocLock16(GPTR, size, &h); return WOWGlobalAllocLock16(GPTR, size, &h);
} }
static void safearray_free(SEGPTR ptr)
{
WOWGlobalUnlockFree16(ptr);
}
/****************************************************************************** /******************************************************************************
* SafeArrayAllocDescriptor [OLE2DISP.38] * SafeArrayAllocDescriptor [OLE2DISP.38]
*/ */
...@@ -90,6 +95,26 @@ HRESULT WINAPI SafeArrayAllocDescriptor16(UINT16 dims, SEGPTR *ret) ...@@ -90,6 +95,26 @@ HRESULT WINAPI SafeArrayAllocDescriptor16(UINT16 dims, SEGPTR *ret)
return S_OK; return S_OK;
} }
/******************************************************************************
* SafeArrayDestroyDescriptor [OLE2DISP.40]
*/
HRESULT WINAPI SafeArrayDestroyDescriptor16(SEGPTR s)
{
TRACE("0x%08x\n", s);
if (s)
{
SAFEARRAY16 *sa = MapSL(s);
if (sa->cLocks)
return DISP_E_ARRAYISLOCKED;
safearray_free(s);
}
return S_OK;
}
/* This implementation of the BSTR API is 16-bit only. It /* This implementation of the BSTR API is 16-bit only. It
represents BSTR as a 16:16 far pointer, and the strings represents BSTR as a 16:16 far pointer, and the strings
as ISO-8859 */ as ISO-8859 */
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
37 stub GETACTIVEOBJECT 37 stub GETACTIVEOBJECT
38 pascal SafeArrayAllocDescriptor(word ptr) SafeArrayAllocDescriptor16 38 pascal SafeArrayAllocDescriptor(word ptr) SafeArrayAllocDescriptor16
39 stub SAFEARRAYALLOCDATA 39 stub SAFEARRAYALLOCDATA
40 stub SAFEARRAYDESTROYDESCRIPTOR 40 pascal SafeArrayDestroyDescriptor(segptr) SafeArrayDestroyDescriptor16
41 stub SAFEARRAYDESTROYDATA 41 stub SAFEARRAYDESTROYDATA
42 stub SAFEARRAYREDIM 42 stub SAFEARRAYREDIM
43 stub VARI2FROMI4 43 stub VARI2FROMI4
......
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