DLL Programmer's Guide for TNS/E Systems
Essential DLL Facility Controls
DLL Programmer’s Guide for TNS/E Systems—527252-006
2-16
Some Examples Using Re-Exportation
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 on page 2-16, 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.
Replacing an Existing Symbol Definition
In a working DLL you can make a new version of an existing symbol having new
function without recompiling that DLL, so that all client loadfiles that use this symbol
will invoke the new function without being relinked and reloaded. Starting from the
situation in Figure 2-1 on page 2-15, Figure 2-3 on page 2-17 illustrates how a new
DLL can combine with an existing DLL to replace the old function. The steps to
accomplish this are:
1. Relink DLL D and rename it DLL Y.
2. In a new DLL D, construct the new procedure to provide the new function and
name its entry point Gamma, the same name as the replaced function in the old
DLL D. Put Y in D’s libList and designate Y re-exported, so users can still access
the old symbols Alpha and Beta from D.
Figure 2-2. Splitting a DLL Into Two Parts
DLL A
Alpha
Beta
Gamma
DLL D
(new)
Gamma
VST022.vsd
DLL Y
(new)
Alpha
Beta










