13 Sep
2023
13 Sep
'23
5:27 a.m.
Nikolay Sivov (@nsivov) commented about dlls/combase/apartment.c:
+ + EnterCriticalSection(&apt_cs); + if (apt && !mta) + apt_mt = mta = apartment_construct(COINIT_MULTITHREADED); + else if ((apt_mt = mta)) + apartment_addref(mta); + LeaveCriticalSection(&apt_cs); + + if (!apt_mt) + { + ERR("Apartment not initialized.\n"); + return CO_E_NOTINITIALIZED; + } + data->implicit_mta = apt_mt; + return S_OK; +} There is apartment_increment_mta_usage(). Could it be used here?
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/3806#note_45145