On Wed, Apr 26, 2017 at 03:45:50PM +0800, Wei Xie wrote:
Fix cann't insert any HBITMAP in RichEdit control
From 2c5a9b4df394c6d50bcc24bcc7b489a864224155 Mon Sep 17 00:00:00 2001 From: Wei xie xiewei@linuxdeepin.com Date: Wed, 26 Apr 2017 15:24:00 +0800 Subject: [PATCH 4/4] ole32: Fix IDataObject_GetDataHere may not implement
Fix cann't insert any HBITMAP in RichEdit control
Signed-off-by: Wei xie xiewei@linuxdeepin.com
dlls/ole32/ole2impl.c | 8 ++++++++ 1 file changed, 8 insertions(+)
diff --git a/dlls/ole32/ole2impl.c b/dlls/ole32/ole2impl.c index a0c4445..5ee031e 100644 --- a/dlls/ole32/ole2impl.c +++ b/dlls/ole32/ole2impl.c @@ -115,6 +115,10 @@ static HRESULT get_storage(IDataObject *data, IStorage *stg, UINT *src_cf, BOOL med.u.pstg = stg; med.pUnkForRelease = NULL; hr = IDataObject_GetDataHere(data, &fmt, &med);
- if (FAILED(hr))
- {
hr = IDataObject_GetData(data, &fmt, &med);
- }
This can't work. The STGMEDIUM is an [out]-only parameter of _GetData(), meaning that the callee will return a new stg in the STGMEDIUM. If this is indeed called (we need tests to check), then you'd have to copy the returned stg into the original one.
Huw.