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 ..
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 ..
I am struggling with COM functions returning RPC_E_DISCONNECTED intermittently when performing cross apartment function calls from a client to a COM server. Most of the time, the problematic calls returns S_OK as expected, but once in a while, we get the RPC_E_DISCONNECTED error. This happens in a native C++ application with two single threaded apartments ..