msi: Set concurrency model to multi-threaded for custom action threads.

Hans Leidekker hans at codeweavers.com
Fri Mar 13 08:48:00 CDT 2009


A custom action in the office 2007 sp1 installer fails right after calling
CoInitializeEx(NULL, COINIT_MULTITHREADED). This is because our code calls
CoInitialize(NULL) first, which sets a different concurrency model, and a
subsequent call with a different model will return RPC_E_CHANGED_MODE.

Ergo, we should set the model to multi-threaded too.

 -Hans

diff --git a/dlls/msi/custom.c b/dlls/msi/custom.c
index 66a7ce6..ffac63f 100644
--- a/dlls/msi/custom.c
+++ b/dlls/msi/custom.c
@@ -695,7 +695,7 @@ static DWORD ACTION_CallDllFunction( const GUID *guid )
             TRACE("calling %s\n", debugstr_w( function ) );
             handle_msi_break( function );
 
-            CoInitialize(NULL);
+            CoInitializeEx(NULL, COINIT_MULTITHREADED);
 
             __TRY
             {



More information about the wine-patches mailing list