Nikolay Sivov : ole2disp: Implement SafeArrayDestroyData().

Alexandre Julliard julliard at winehq.org
Mon Jan 22 15:34:54 CST 2018


Module: wine
Branch: master
Commit: da3b5129a58309cb7435fc74a65bcbd9e4d7f366
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=da3b5129a58309cb7435fc74a65bcbd9e4d7f366

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Sun Jan 21 19:55:39 2018 +0300

ole2disp: Implement SafeArrayDestroyData().

Based on patch by Vijay Kiran Kamuju.

Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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 98aca3d..b981485 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 7b00ac3..57d2254 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




More information about the wine-cvs mailing list