Robert Müller
|
4bb549b68e
|
Initialize the Windows COM library on all threads
Use threading model `COINIT_APARTMENTTHREADED` on threads that own a window (the main client thread) and `COINIT_MULTITHREADED` on all other threads.
Add assertions to ensure that the COM library is initialized successfully and only once per thread.
References:
- https://learn.microsoft.com/en-us/windows/win32/learnwin32/initializing-the-com-library
- https://learn.microsoft.com/en-us/windows/win32/com/single-threaded-apartments
- https://learn.microsoft.com/en-us/windows/win32/com/multithreaded-apartments
Yet another attempt at solving #5744.
|
2022-10-12 17:18:57 +02:00 |
|