DLL Programmer's Guide for TNS/R Systems

Essential DLL Facility Controls
DLL Programmer’s Guide for TNS/R Systems522203-002
2-14
Some Examples Using Re-Exportation
or groups. To split a DLL in two, you give one of the new DLLs the name of the original
and have it re-export the other.
Figure 2-1 above illustrates DLL D exporting symbols Alpha, Beta, and Gamma, while
its client, DLL A, imports those symbols. Suppose that you want to replace D with two
loadfiles, one which provides the Gamma definition and the other which provides the
Alpha and Beta definitions, and you do not want to affect D’s client loadfiles. You can
do this as follows.
1. Split the source for D to create the two new loadfiles: one that exports Alpha and
Beta, the other that exports Gamma.
2. Recompile and relink the new sources, and give one resulting loadfile (say the one
that exports Alpha and Beta) a new name, Y. Give the other loadfile the old
name, D. See Naming DLLs on page 2-3.
3. Set up D to re-export Y.
The result is shown in Figure 2-2 below, where the dashed lines through D indicate re-
exportation. All the clients of D, like A, still get symbols Alpha, Beta, and Gamma
through D, so they need not be changed.
Figure 2-1. DLL A Imports DLL D’s Symbols.
DLL A
Alpha
Beta
Gamma
DLL D
Alpha
Beta
Gamma
VST021.vsd