[PATCH 3/6] ole32: Use the helper function to copy the clipboard's FORMATETC.
Huw Davies
huw at codeweavers.com
Thu May 18 05:07:04 CDT 2017
Signed-off-by: Huw Davies <huw at codeweavers.com>
---
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 d48ea792d6..b3c76650c4 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
--
2.12.0
More information about the wine-patches
mailing list