I have an ActiveX DLL running inside MTS on an application server. There are about 20 class modules in the dll that are instantiated by the client using:
Set mobjXYZ = CreateObject("DLLName.ClassName", MyServer)
It is clear that we can have one object instantiated by 15 different clients almost simultaneously and each will have their own "copy" of object (e.g. if I ask for employee #1 and you ask for employee #2 at the same time, there is no collision between our requests). The two instances may even be created in two separate threads.
What if the object we're creating uses some code in a Basic Module! There is no instantiation of an object when calling subroutines in a code module -- is there a possibility of a collision?
For example, let's say that there is an object that two users instantiate simultaneously, we now have two instances of the object running. These objects call a long running subroutine in a code module. Will the first instance cause the second one to wait until it is done or will it allow the second instance to get started? If the common subroutine accepts a parameter, if while the first instance is running and using the input parameter, the second instance calls the same subroutine with a different parameter value, will that effect the first instance?
I guess another way to put this is: When calling a subroutine in a Basic Module within a multiuser environment, does the subroutine run in each caller's space (in a sense making a copy of itself) or does it run in its own space?
I hope you can understand what I'm trying to say here!
Thanks in advance!
[sig]<p> Tarek<br><a href= > </a><br>The more I learn, the more I need to learn![/sig]