ole32 : wrong check in compobj.c

Paul Vriens Paul.Vriens at xs4all.nl
Mon Jan 10 10:49:32 CST 2005


while looking through the code I saw:


this will never work as COINIT_MULTITHREADED = 0.

The attached patch fixes the 3 occurrences of a check against COINIT_*.

This patch however makes the COM_CreateApartment in compobj.c:

    545   if (!(apt = COM_CurrentInfo()->apt))
    546   {
    547     apt = COM_CreateApartment(dwCoInit);
    548     if (!apt) return E_OUTOFMEMORY;
    549   }

return E_OUTOFMEMORY, always (?). And that makes sure that we have
a mismatch between CoInitialize and CoUninitialize.

So there's definitely something else wrong as well.

Any idea ?


-------------- next part --------------
A non-text attachment was scrubbed...
Name: compobj.diff
Type: text/x-patch
Size: 1407 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-devel/attachments/20050110/1edfca51/compobj.bin

More information about the wine-devel mailing list