https://bugs.winehq.org/show_bug.cgi?id=42695
--- Comment #48 from Nikolay Sivov bunglehead@gmail.com --- Great, thanks for the fix. Maybe it hits some shortcut path with DefWindowProc() as class procedure.
Anyway, I'll try to test some more to see when exactly such initialization happens. It seems like it's meant to be transparent, so application that normally initializes its threads can still do so, in desired apartment model.
I have a patch that implements such workaround, and it seems to work.