PATCH/RFC: defer OLE apartment window creation

Robert Shearman rob at codeweavers.com
Tue Dec 20 20:55:14 CST 2005


Marcus Meissner wrote:

>@@ -257,6 +254,15 @@
>     return apt;
> }
> 
>+void make_apartment_window(APARTMENT *apt) {
>+    if (apt->win) return;
>+    if (!(apt->model & COINIT_APARTMENTTHREADED))
>+        return;
>+    apt->win = CreateWindowW(wszAptWinClass, NULL, 0,
>+                             0, 0, 0, 0,
>+                             0, 0, OLE32_hInstance, NULL);
>+}
>+
>

This isn't thread-safe. It would also be better to make this an accessor 
function for the win field of struct apartment and fix up all callers to 
use this. I still have to verify on Windows whether this is what it does 
or whether it does something funny with message loops.

-- 
Rob Shearman




More information about the wine-patches mailing list