Category : apartments

Am working on a Windows application that uses multiple USB sound interfaces with ASIO drivers. Each driver exposes an in-process COM server and has to be run using a Single Threaded Apartment: My plan is to run each in it’s own STA responsible for processing callbacks and controlling the devices while the heavy lifting is ..

Read more

Suppose I have a COM object created on an MTA thread (i.e., initialized with CoInitializeEx(NULL, COINIT_MULTITHREADED)). I would like to use said object from some other, arbitrary, thread. For instance, from the thread pool. Since I don’t own this thread, I cannot call CoInitializeEx on it, so technically I cannot use COM. I’ve seen other ..

Read more