shell32: add missing ole init

Robert Shearman rob at codeweavers.com
Mon Dec 12 01:22:36 CST 2005


Eric Pouech wrote:

>RCS file: /home/cvs/cvsroot/wine/wine/dlls/shell32/shellole.c,v
>retrieving revision 1.87
>diff -u -u -r1.87 shellole.c
>--- dlls/shell32/shellole.c	10 Nov 2005 11:15:22 -0000	1.87
>+++ dlls/shell32/shellole.c	11 Nov 2005 08:53:25 -0000
>@@ -193,6 +193,7 @@
> 
> 	} else {
> 
>+            CoInitialize(0);
> 	    /* load an external dll in the usual way */
> 	    hres = CoCreateInstance(myclsid, pUnkOuter, CLSCTX_INPROC_SERVER, refiid, ppv);
> 	    goto end;
>  
>

Where is the matching CoUninitialize call? This is usually necessary 
because destructing a COM apartment in DLL_THREAD_DETACH instead of 
CoUninitialize can cause deadlocks. It might be that the native version 
also doesn't uninitialize the apartment, but this needs tests.

-- 
Rob Shearman




More information about the wine-devel mailing list