Sharing DLL Data Across Different Processes

Back in the world of 16-bit Windows, DLL memory was handled differently than it is in the 32-bit world of Win32. One often-used trait of 16-bit DLLs is that they share global memory among different applications. In other words, if you declare a global variable in a 16-bit DLL, any application using that DLL will have access to that variable, and changes made to that variable by an application will be seen by other applications.

In some ways, this behavior can be dangerous because one application can overwrite data on which another application is dependent. In other ways, developers have made use of this characteristic.

In Win32, this sharing of DLL global data no longer exists. Because each application ...

Get Borland® Delphi™ 6 Developer's Guide now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.