> This was already committed, but is this really correct? I'm not seeing RtlRestoreContext exported from i386 kernel32 or ntdll on my Windows 10 machine. (Maybe it's out of date, though? I have Windows 10 version 21H2, build 19044.1826.)
Yes, it was added fairly recently.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/678#note_6852
Fixes a bug that occurs when:
- `CoInitializeEx(NULL, COINIT_MULTITHREADED);` is called on thread 1
- `CoInitializeEx(NULL, COINIT_MULTITHREADED);` is called on thread 2
- `CoUninitialize()` is called on thread 1.
- `CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);` is called on thread 1.
After this, when attempting to marshal an interface on thread 2, when `ipid_to_ifstub` is called, `apartment_findfromtid()` will find thread 1's STA and not the MTA.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/705