I have an in-process COM server (DLL implemented in .NET) that supports
threading model "both".
I have two STA threads (initialized via CoInitialize(NULL)), each of them
creates *its own* instance of the COM, via CoCreateInstance, CLSCTX_ALL.
When one of the instances serves a request, is the second instance blocked?
I don't think the instances should block each other, if they are different
and each one is accessed from its creating thread only. At least, I
understand the STA documentation this way. But in reality I have exactly
this situation, and my application behaves as if access to the whole DLL
server was serialized. We've witten the DLL ourselves, so I'm sure the DLL
doesn't use locking at the static methods level.
Thank you,
Martin.
Not by COM. Your code could be doing its own locking, of course. However, I know next to nothing about .NET COM interop - perhaps .NET is doing some kind of locking, too. You may want to ask in microsoft.public.dotnet.framework.interop
--
With best wishes,
Igor Tandetnik
With sufficient thrust, pigs fly just fine. However, this is not necessarily a good idea. It is hard to be sure where they are going to land, and it could be dangerous sitting under them as they fly overhead. -- RFC 1925