DLL Programmer's Guide for TNS/R Systems
Essential DLL Facility Controls
DLL Programmer’s Guide for TNS/R Systems—522203-002
2-15
Some Examples Using Re-Exportation
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 altered. Starting from the situation in
Figure 2-1 on page 2-14, Figure 2-3 on page 2-15 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
Figure 2-3. the New Symbol, Gamma, With New Function (Shaded), Replaces
the Old Gamma.
DLL A
Alpha
Beta
Gamma
DLL D
(new)
Gamma
VST022.vsd
DLL Y
(new)
Alpha
Beta
DLL A
Alpha
Beta
Gamma
DLL D
(new)
Gamma
VST023.vsd
DLL Y
(old D)
Alpha
Beta
Gamma
X