views:

453

answers:

1

I need to encapsulate a VB6 application as a COM object that will be called by IIS. One of the dlls used by the VB6 app is NOT thread-safe.

How can I make sure that whenever my COM object is called it doesn't share the same dll with other instances of itself?

I read somewhere that ActiveX exes run each instance in a different process, would that be enough?

+1  A: 

Your going to need to read up on COM and apartment threading models, link text. While what your doing is possible your performance is going to be horrible because you will end up using single threaded apartments, so all requests will be serialized. You really should investigate creating a separate process for each of these requests.

LanceSc
I thought that's exactly what an ActiveX exe would do: create a new process for each call. Is this incorrect?
Fernando
I have only dealt with COM Objects as DLLs, but from a quick look at the MSDN it may be possible to use an out-of-process ActiveX executable to do this. Rather than trying to port the hole application you should create a small test application.
LanceSc