I have project A and project B. Project B has a thread that does some work with Microsoft Outlook Interop. Project A is a GUI and is marked as STAThread on the main entry point.
If I call project b from within A, will the thread created in project B be STA or MTA?
I have an error "Retrieving the COM class factory for component with CLSID... An outgoing call cannot be made since the application is dispatching an input-sync call."
All threads default to MTAs, unless SetApartmentState
is called before the thread is started.
If you think about it, the thread can't share the Single Threaded Apartment of an existing thread.