Global variables declared in a
shared library cannot be imported by an Object Pascal application.
A library can be used by several applications at once, but each application has a copy of the library in its own process space with its own set of global variables. For multiple libraries or multiple instances of a library to share memory, they must use memory-mapped files. Refer to the your system documentation for further information.
Writing dynamically loadable libraries
在共享库中声明的全局变量不能被Object
Pascal应用程序引入。
一个库可以被几个应用程序一次使用,但在每个应用程序的进程空间中,各自拥有该库的一个副本及自身的一套全局变量。对于共享内存的多个库或一个库的多个实例,它们必须使用内存映射文件(memory-mapped files)。更深入的信息请参阅操作系统相关文档。