I'm using the AdfinXRt Realtime example C++ project, and have changed the COM initialisation call in ListDlg.cpp from CoInitialize(0) to CoInitializeEx(NULL, COINIT_MULTITHREADED), to reflect how I intend to use this API in my application. However, the example no longer works because the call to a_eikonDesktopDataAPI->CreateAdxRtList() in AdxRtList.cpp now returns a null COM pointer. Is it possible to use the COM API in the COINIT_MULTITHREADED mode?
All Eikon COM APIs are implemented using STA (single-threaded apartment) model. They cannot be used in a multi-threaded apartment. To use Eikon COM APIs in your project you need to dedicate a thread, which will house all Eikon COM objects your application creates. Because Eikon COM libraries are implemented as reg free COM, these objects will only be accessible from the thread on which they were created.