>>Also, check out the articles:
>>
>>
http://msdn.microsoft.com/library/techart/mtsvfp.htm>>
>>
http://www.west-wind.com/presentations/mts/mts.htm>>
>>
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fox7help/html/newcontrolling_call_blocking.asp>
>Thanks - I'm now building up a sizeable list of URLS to visit and read. ;-)
>
>One concern I have - if I make the dll multi-threaded, what happens to object properties and variables.
>
>Say User1 instanciates my object and myojbect.property1 is set to "123", with a variable myvariable set to "Matt".
>
>If User2 simultaneously instanciates the object, are the properties and variables [and anything else] kept separate from each other or do the users share properties etc?
No, it is Apartment model threading - each instance (apartment) does not know anything about the neighbours.
A quote from the article "Control of Call Blocking" (
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fox7help/html/newcontrolling_call_blocking.asp )
The Visual FoxPro implementation of Apartment-model threading eliminates conflicts in accessing global data from multiple threads by giving each apartment its own copy of global data. This means that all objects created on the thread exist in this apartment, and are unaware of objects in other apartments. >I possibly didn't explain that very well - been on the 'phone all day trying to get this to work [the client is in England and I'm in Scotland], so my head is nipping as we say here ;-)
>
>Best.
>
>Matt.
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro
"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison