On Wed, Apr 26, 2017 at 03:46:23PM +0800, Wei Xie wrote:
Fix cann't insert any HBITMAP in RichEdit control
From a96e73f270745f0694ea340eb8119566d75f1117 Mon Sep 17 00:00:00 2001 From: Wei xie xiewei@linuxdeepin.com Date: Wed, 26 Apr 2017 15:14:36 +0800 Subject: [PATCH 3/4] ole32: Add init cache code after OleLoad in OleCreateFromDataEx
Fix cann't insert any HBITMAP in RichEdit control
Signed-off-by: Wei xie xiewei@linuxdeepin.com
dlls/ole32/ole2impl.c | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/dlls/ole32/ole2impl.c b/dlls/ole32/ole2impl.c index ccf31fa..a0c4445 100644 --- a/dlls/ole32/ole2impl.c +++ b/dlls/ole32/ole2impl.c @@ -181,6 +181,7 @@ HRESULT WINAPI OleCreateFromDataEx(IDataObject *data, REFIID iid, DWORD flags, { HRESULT hr; UINT src_cf;
IOleCache* ole_cache;
FIXME("(%p, %s, %08x, %08x, %d, %p, %p, %p, %p, %p, %p, %p): stub\n", data, debugstr_guid(iid), flags, renderopt, num_cache_fmts, adv_flags, cache_fmts,
@@ -193,6 +194,11 @@ HRESULT WINAPI OleCreateFromDataEx(IDataObject *data, REFIID iid, DWORD flags, if(FAILED(hr)) return hr;
/* FIXME: Init cache */
- hr = IUnknown_QueryInterface((IUnknown*)*obj, &IID_IOleCache, (void**)&ole_cache);
- if (SUCCEEDED(hr))
- {
hr = IOleCache_InitCache(ole_cache, data);
- }
You'll need to release the ole_cache. Again we'll need some tests.
Huw.