   Win32 Apartment threaded ATL COM from MTA thread
  Hi, does anyone know what do I need to get the STA COM to work from a thread that calls CoInitializeEx(COINIT_MULTITHREADED);If I CoCreate the object from CoInitializeEx(COINIT_APARTMENTTHREADED); thread, then I can query for all interface pointers and everything works fine.But if I do the same from CoInitializeEx(COINIT_MULTITHREADED); thread, sometimes I get the IUnknown, sometimes I can even get the IDispatch, sometimes even the IMyInterface, but more often than not everything explodes with E_NOINTERFACE.If I understand correctly that's because the COM interfaces have to be marshaled, and asking for interfaces from MTA thread this way is very wrong. But they are created via ATL wizards, and I thought the proxies should be auto-generated and the COM should take the care of all the marshaling stuff.Basically what I think should happen behind the scenes is:1) App starts2) Initializes itself to MTA3) Call to CoCreate is made4) COM notices that object is marked as Apartment threaded in registry5) COM creates a STA apartment and object within it and creates proxy in MTA and stub in STA6) everything worksIn reality nothing works...Am I missing something?   