DLL Programmer's Guide for TNS/R Systems
DLLs on a TNS/R System
DLL Programmer’s Guide for TNS/R Systems—522203-002
1-4
Why Dynamically Linked Libraries?
Why Dynamically Linked Libraries?
For statically-linked programs, you must copy all shared libraries into your own
programs; thus, complete copies of these libraries appear in all the programs that use
them, and each copy consumes main memory and disk space. Also, whenever such a
library is changed, it must be relinked into all the programs that need those changes.
TNS/R shared runtime libraries (SRLs) offer some improvement, but DLLs are easier
to create and install than SRLs and so they are provided for you to use in building
applications.
Some key characteristics of DLLs are:
•
A single copy of a DLL in physical memory can be shared among multiple
processes.
•
A DLL that is shared among processes can appear at a different virtual address in
each process; and each instance has its own copy of global data that is available
to its process.
•
Multiple processes can use different versions of the same DLL simultaneously,
though each version must have a different name or be stored in a different location
in the file system.
Figure 1-2. An Application Made Up Of a Program And The DLLs It Needs
Program
DLL A DLL B DLL C
DLL D DLL E
DLL G
DLL F
VST012.vsd