http://bugs.winehq.org/show_bug.cgi?id=32951
--- Comment #10 from Henri Verbeet hverbeet@gmail.com 2013-02-14 15:20:02 CST --- Right, ExitProcess() would probably do it. I think MSDN claims we're supposed to kill other threads before unloading dlls, but I don't think we do. That's not to say the result would necessarily be any better in general, but I suppose in this case it would at least prevent the other thread from accessing surfaces we just released.