ole32: Marshal interfaces returned by IRemUnknown as local

Nikolay Sivov nsivov at codeweavers.com
Mon Oct 22 06:20:40 CDT 2012


This fixes Excel 2010 integration with Word 2010 regarding charts edit 
operations in embedded charts based on Excel data.
The issue is clearly visible in logs, HWND_UserSize() fails because of 
context being set to MSHCTX_DIFFERENTMACHINE, and
it's supposed to fail this way.

I'm not entirely sure how this should be fixed properly, I guess I can't 
use IRemUnknown own context as there's only one marshalled pointer for 
it per apartment, probably each context mode could be stored in 
stub_manager for each object requested with RemQueryInterface(). So any 
suggestions on this are welcome.
-------------- next part --------------
>From 2f4b0239c8545f5c9269e90972af79938668ac52 Mon Sep 17 00:00:00 2001
From: Nikolay Sivov <nsivov at codeweavers.com>
Date: Mon, 22 Oct 2012 14:09:13 -0400
Subject: [PATCH 9/9] Marshal interfaces returned by IRemUnknown as local

---
 dlls/ole32/stubmanager.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/ole32/stubmanager.c b/dlls/ole32/stubmanager.c
index e7018b9..49c7cac 100644
--- a/dlls/ole32/stubmanager.c
+++ b/dlls/ole32/stubmanager.c
@@ -667,7 +667,7 @@ static HRESULT WINAPI RemUnknown_RemQueryInterface(IRemUnknown *iface,
     for (i = 0; i < cIids; i++)
     {
         HRESULT hrobj = marshal_object(apt, &(*ppQIResults)[i].std, &iids[i],
-                                       stubmgr->object, MSHCTX_DIFFERENTMACHINE, NULL, MSHLFLAGS_NORMAL);
+                                       stubmgr->object, MSHCTX_LOCAL, NULL, MSHLFLAGS_NORMAL);
         if (hrobj == S_OK)
             successful_qis++;
         (*ppQIResults)[i].hResult = hrobj;
-- 
1.7.10.4



More information about the wine-patches mailing list