共用方式為


VFP7T.DLL Run-Time Library

This multithreaded run-time helps eliminate the blocking issues associated with the vfp7r.dll run time. With vfp7t.dll run time library, you can deploy in-process servers without blocking of code execution.

Because the Vfp7t.dll is a lightweight run-time library designed only for in-process servers, many commands and functions related to visual and user input features have been disabled.

Because no blocking occurs in vfp7t.dll, an object executing an unusually long procedure (such as printing out a report) won't prevent other objects from executing quick rapid routines. For example, with vfp7r.dll, an object that executes a 1 second database query routine may have to wait 15 minutes for an object printing a long, complex report. If you build with vfp7t.dll you won't have the same bottleneck.

In addition to addressing blocking issues, implementing Apartment-model threading in the vfp7t.dll run time also eliminates conflicts in accessing global data from multiple threads by giving each apartment its own copy of global data. The vfp7t.dll uses thread local storage to give each class instance its own set of data. This means that a variable you declare PUBLIC is global only to the thread; each thread has an instance of the variable.

Note   Read-write properties of the Application object such as AutoYield are global to the project.

Visual FoxPro makes it possible for the same vfp7t.dll run time to be deployed with multiple, concurrently called in-process .dll automation servers whether they are in same process/thread or not. The original vfp7r.dll run time creates a renamed copy of the library for each in-process .dll server running in the same process.

Visual FoxPro offers a Session Class, which you should use for OLEPUBLIC server classes. As with forms, the DataSession property makes it possible for you to create a private data session for your object upon instantiation. The advantage of the Session class is that it uses much less memory than a form. The vfp7t.dll run time automatically protects globals and user data through thread local storage, but this only applies between apartments (threads). Objects on the same thread instantiated from the same .dll are able to access each other's data. The Session class aids in data protection within the thread.

Since the vfp7t.dll run time is designed for use only with in-process servers, it has been scaled down in size. Many user interface commands and functions have been eliminated including older FoxPro 2.x READ and @Get/Say support. In addition, some of the designers such as Table Designer and Report Designer, which exist in the vfp7r.dll run time, have also been removed. The vfp7t.dll run time still supports visual classes such as forms.

See Also

VFP7R.DLL Run-Time Library | Server Design Considerations and Limitations | Interoperability and the Internet |Visual FoxPro Run-Time Libraries | Selection of Process Types