Discussion:
VB 6.0 problem with single Thread , and apartment threading model
(too old to reply)
as13
21 years ago
Permalink
Hi ,
Seems that my VB6.0 dll behaves exactly same if i make it in single
thread or apartment thread model.
I expect client2 to enter the function func(), only after client1 has
exited it in Single Thread.
But it does not seem to be that way?
Also, is there any code to synchronize code in VB6.0?
Please help with an example.
Thanks,
Anshuman
DNagel
21 years ago
Permalink
Post by as13
Hi ,
Seems that my VB6.0 dll behaves exactly same if i make it in single
thread or apartment thread model.
I expect client2 to enter the function func(), only after client1 has
exited it in Single Thread.
But it does not seem to be that way?
Also, is there any code to synchronize code in VB6.0?
Please help with an example.
Thanks,
Anshuman
This is a tricky topic, but I believe what you're seeing is that each
application that uses resources from a DLL, uses them inside it's own
memory space. The threading benefits are on a per application basis
and are only seen intra-application...

D.
as13
21 years ago
Permalink
I should have been more explicit here. I agree that 2 appl. would have
this dll in therir own space and then synchronization issue is not
there. Well, suppose, i have this dll, being called by DLLHOST, which
itself is spawned though IIS, then it is one DLLHOST process, even
though i have two clients accessing through IIS.
Now, i suppose that in DLLHOST, two threads corresponding to the two
clients would be present. Now, if the dll is SingleThreaded or STA,
then they should work in queue.
Am I missing something here?
Please help.
Thanks,
Anshuman

Loading...