Nikolay Sivov : ole32: Use OleRun() in OleCreate() instead of unrolling what it does.
Alexandre Julliard
julliard at wine.codeweavers.com
Thu Dec 24 14:40:05 CST 2015
Module: wine
Branch: master
Commit: b19ad3af80684b92e5555284d57e78d0bcdec226
URL: http://source.winehq.org/git/wine.git/?a=commit;h=b19ad3af80684b92e5555284d57e78d0bcdec226
Author: Nikolay Sivov <nsivov at codeweavers.com>
Date: Thu Dec 24 13:33:57 2015 +0300
ole32: Use OleRun() in OleCreate() instead of unrolling what it does.
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/ole32/ole2.c | 17 ++++-------------
1 file changed, 4 insertions(+), 13 deletions(-)
diff --git a/dlls/ole32/ole2.c b/dlls/ole32/ole2.c
index 5bfd8a3..cec8c00 100644
--- a/dlls/ole32/ole2.c
+++ b/dlls/ole32/ole2.c
@@ -2574,21 +2574,12 @@ HRESULT WINAPI OleCreate(
if (((renderopt == OLERENDER_DRAW) || (renderopt == OLERENDER_FORMAT)) &&
SUCCEEDED(hres))
{
- IRunnableObject *pRunnable;
- IOleCache *pOleCache;
- HRESULT hres2;
-
- hres2 = IUnknown_QueryInterface(pUnk, &IID_IRunnableObject, (void **)&pRunnable);
- if (SUCCEEDED(hres2))
- {
- hres = IRunnableObject_Run(pRunnable, NULL);
- IRunnableObject_Release(pRunnable);
- }
-
+ hres = OleRun(pUnk);
if (SUCCEEDED(hres))
{
- hres2 = IUnknown_QueryInterface(pUnk, &IID_IOleCache, (void **)&pOleCache);
- if (SUCCEEDED(hres2))
+ IOleCache *pOleCache;
+
+ if (SUCCEEDED(IUnknown_QueryInterface(pUnk, &IID_IOleCache, (void **)&pOleCache)))
{
DWORD dwConnection;
if (renderopt == OLERENDER_DRAW && !pFormatEtc) {
More information about the wine-cvs
mailing list