Hi,

I have a VB COM client and an in-process COM object (VC++) both in the same STA. However, I need to add some asynchronous functionality to the COM object, creating worker threads to do concurrent processing. I am thinking that the COM object now has to be created in an MTA so that the asynchronous calls from the worker threads to the COM object are not serialised by the STA message queue. Is this correct?

Also, if I now have an STA client making lots of calls to a COM object in the MTA, I am concerned that the marshalling overhead may negate any performance improvements I make by introducing multi-threading in my COM object. Is this likely if the inter-apartment calls are in the same process - is the marshalling overhead between apartments in the same process the same as marshalling between different processes?

I am a bit stuck here, as I cannot rewrite the VB client so this has to stay an STA, and my COM object needs to be in an MTA to acheive multi-threading (the threads make calls to the COM object).

Any ideas would be very helpful - thanks :-)