Robert Shearman wrote:
Christian Costa wrote:
Robert Shearman wrote:
Christian Costa wrote:
Index: pin.c
RCS file: /home/wine/wine/dlls/quartz/pin.c,v retrieving revision 1.9 diff -u -r1.9 pin.c --- pin.c 16 Dec 2004 14:25:15 -0000 1.9 +++ pin.c 24 Dec 2004 13:31:52 -0000 @@ -1134,6 +1134,8 @@ REFERENCE_TIME rtCurrent; ALLOCATOR_PROPERTIES allocProps;
CoInitialize(NULL);
SetEvent(This->hEventStateChanged);
hr = IMemAllocator_GetProperties(This->pAlloc, &allocProps);
Good catch, but it would probably be better to use CoInitializeEx(NULL, COINIT_MULTITHREADED). This seems to be what Microsoft uses for the pull thread.
I was wondering about that but since I'm not very confident with this apartment stuff... I will try and see if it's still work.
The problem with using COINIT_APARTMENTHREADED (which is what you effectively are using when you use the non-Ex version of the function) is that it depends on using window messages when marshaling. The pull thread does not have a message queue and does not dispatch messages, therefore marshaled objects could hang when called. It is an unlikely case (who would want to use marshaled objects in a performance sensitive component), but you never know with these crazy Windows applications.
Rob
Thanks for the explanation, Rob. I've just try and it still works fine with the change.
Bye, Christian