.NET Development
VFP COM and global variables
09/06/2010
12:13:44 PM
30V0Q7N20 Show this entire thread in new window
Gratar Image based on email address
From:
David Reymers
To:
All 
Attachments:
None
I'm trying to understand the scope of public variables in a VFP COM in-process DLL that is consumed by a .NET application.

Suppose I have two separate threads, each of which instantiates its own copy of the VFP DLL, and that this VFp code makes use of public (global) variables.

It looks from my testing like the class properties are contained within each thread, but that the public variables are shared between the two threads.

Anyone have experience with this? And...is there any way to suppress this behavior, so that public variables are not shared between threads? Although it seems that could be really useful, I'm working with a large legacy app strewn with public variables that must retain their values in their own threads (and I'd really don't want to rewrite it to change the publics to properties).

Thanks!
Dave