[PATCH] ole2disp: Implement SafeArrayDestroyData()
Nikolay Sivov
nsivov at codeweavers.com
Sun Jan 21 10:55:39 CST 2018
Based on patch by Vijay Kiran Kamuju <infyquest at gmail.com>
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
---
dlls/ole2disp.dll16/ole2disp.c | 19 +++++++++++++++++++
dlls/ole2disp.dll16/ole2disp.dll16.spec | 2 +-
2 files changed, 20 insertions(+), 1 deletion(-)
diff --git a/dlls/ole2disp.dll16/ole2disp.c b/dlls/ole2disp.dll16/ole2disp.c
index 98aca3dbee..b98148550f 100644
--- a/dlls/ole2disp.dll16/ole2disp.c
+++ b/dlls/ole2disp.dll16/ole2disp.c
@@ -270,6 +270,25 @@ HRESULT WINAPI SafeArrayDestroyDescriptor16(SEGPTR s)
return S_OK;
}
+/******************************************************************************
+ * SafeArrayDestroyData [OLE2DISP.41]
+ */
+HRESULT WINAPI SafeArrayDestroyData16(SAFEARRAY16 *sa)
+{
+ TRACE("%p\n", sa);
+
+ if (!sa)
+ return S_OK;
+
+ if (sa->cLocks)
+ return DISP_E_ARRAYISLOCKED;
+
+ if (!(sa->fFeatures & FADF_STATIC))
+ safearray_free(sa->pvData);
+
+ return S_OK;
+}
+
/* This implementation of the BSTR API is 16-bit only. It
represents BSTR as a 16:16 far pointer, and the strings
as ISO-8859 */
diff --git a/dlls/ole2disp.dll16/ole2disp.dll16.spec b/dlls/ole2disp.dll16/ole2disp.dll16.spec
index 7b00ac353b..57d2254afd 100644
--- a/dlls/ole2disp.dll16/ole2disp.dll16.spec
+++ b/dlls/ole2disp.dll16/ole2disp.dll16.spec
@@ -38,7 +38,7 @@
38 pascal SafeArrayAllocDescriptor(word ptr) SafeArrayAllocDescriptor16
39 pascal SafeArrayAllocData(ptr) SafeArrayAllocData16
40 pascal SafeArrayDestroyDescriptor(segptr) SafeArrayDestroyDescriptor16
-41 stub SAFEARRAYDESTROYDATA
+41 pascal SafeArrayDestroyData(ptr) SafeArrayDestroyData16
42 stub SAFEARRAYREDIM
43 stub VARI2FROMI4
44 stub VARI2FROMR4
--
2.15.1
More information about the wine-devel
mailing list