On Tue, 11 Mar 2003 12:22:04 +0530, Mihir Pathak <[EMAIL PROTECTED]> wrote:
> > >-----Original Message----- >I am trying to integrate with a particular back end application that has >a non thread-safe COM API. From an integration perspective, multiple >front end users will probably result in the back end API getting called >in a manner that requires multi-threaded behavior (the ability to run >multiple processes in parallel). Given this, I'd like to find out if >there are any workarounds at the COM layer to circumvent this problem. >I'd really appreciate any approaches that have worked in the past, >ideas, etc. > >Mihir. > > If by a non thread-safe COM API, you mean you are interfacing with an existing STA based COM API, then this will be handled automatically for you by COM interop - in this case, any calls from managed code will be serialized as expected to the STA apartment's thread. If you're dealing with an MTA COM component, then the developers should have implemented thread concurrency management on the component itself. If not, they are breaking COM rules and you would also have problems using this component from multiple threads with legacy COM clients. If you're going to be doing a lot of interfacing with COM, you may want to consider buying Adam Nathan's excellent book '.NET and COM - The complete interoperability guide". Phil Parker. =================================== This list is hosted by DevelopMentor® http://www.develop.com You may be interested in Guerrilla .NET, 24 March 2003, in London http://www.develop.com/courses/gdotnet View archives and manage your subscription(s) at http://discuss.develop.com