Correction to COINIT_MULTITHREADED test

Paul Vriens Paul.Vriens at xs4all.nl
Tue Jan 11 05:55:24 CST 2005


On Tue, 2005-01-11 at 12:19, Christian Costa wrote:
> All the time ?
> Looking at COM_CreateApartment it seems COINIT_APARTMENTTHREADED works but indeed COINIT_MULTITHREADED always return NULL.
> I think the code at the beginning of COM_CreateApartment is wrong.
> 
>             TRACE("thread 0x%lx is entering the multithreaded apartment\n", GetCurrentThreadId());
>             COM_CurrentInfo()->apt = &MTA;
>             return apt;
> 
> I think we should return COM_CurrentInfo()->apt rather than apt.
> 
> Bye,
> Christian
> 
With all the time, I mean that when CoInitializeEx is called with
COINIT_MULITHREADED it itself will return E_OUTOFMEMORY (because of the
NULL being passed back by COM_CreateApartment).

Another thing in MSDN which is currently not accounted for (AFAIK) is:

Multiple calls to CoInitializeEx by the same thread are allowed as long
as they pass the same concurrency flag, but subsequent valid calls
return S_FALSE

Cheers,

Paul.




More information about the wine-devel mailing list