On Wed Aug 24 20:19:17 2022 +0000, **** wrote:
Zebediah Figura (she/her) replied on the mailing list: ``` On 8/24/22 13:42, Connor McAdams wrote:
From: Connor McAdams <cmcadams(a)codeweavers.com>
It is possible for a thread that creates an MTA to call CoUninitialize() and not destroy the MTA if another thread has entered the MTA in the meantime. If the original thread then creates an STA, subsequent attempts to find the MTA with 'apartment_findfromtid' will get the original thread's STA. To avoid this, don't set a TID value in the stub manager IPID value to indicate that the stub resides in the MTA.
Signed-off-by: Connor McAdams <cmcadams(a)codeweavers.com> --- dlls/combase/stubmanager.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
Is it possible to add a test for this? ``` Sure! For some reason I had only looked at `dlls/combase/tests/` and thought all the tests went there, but looks like I could add one to `dlls/ole32/tests/`. I'll do that tomorrow and send a v2.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/705#note_6850