Huw Davies : ole32: Use the helper function to copy the clipboard' s FORMATETC.

Alexandre Julliard julliard at winehq.org
Thu May 18 15:27:50 CDT 2017


Module: wine
Branch: master
Commit: 77d1eba7fa6a39ce391f136247da53beb4a0eb28
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=77d1eba7fa6a39ce391f136247da53beb4a0eb28

Author: Huw Davies <huw at codeweavers.com>
Date:   Thu May 18 11:07:04 2017 +0100

ole32: Use the helper function to copy the clipboard's FORMATETC.

Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/ole32/clipboard.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/dlls/ole32/clipboard.c b/dlls/ole32/clipboard.c
index d48ea79..b3c7665 100644
--- a/dlls/ole32/clipboard.c
+++ b/dlls/ole32/clipboard.c
@@ -330,14 +330,8 @@ static HRESULT WINAPI OLEClipbrd_IEnumFORMATETC_Next
 
     for(i = 0; i < cfetch; i++)
     {
-      rgelt[i] = This->data->entries[This->pos++].fmtetc;
-      if(rgelt[i].ptd)
-      {
-        DVTARGETDEVICE *target = rgelt[i].ptd;
-        rgelt[i].ptd = CoTaskMemAlloc(target->tdSize);
-        if(!rgelt[i].ptd) return E_OUTOFMEMORY;
-        memcpy(rgelt[i].ptd, target, target->tdSize);
-      }
+      hres = copy_formatetc(rgelt + i, &This->data->entries[This->pos++].fmtetc);
+      if(FAILED(hres)) return hres;
     }
   }
   else




More information about the wine-cvs mailing list