DLL Programmer's Guide for TNS/E Systems
Dynamic Use of DLLs
DLL Programmer’s Guide for TNS/E Systems—527252-006
3-10
Using Dynamically Loaded DLLs to Extend an
Application
More elaborate conventions can have the DLL export a canonical "master" function
or data structure that describes the functions or data available in this library. The
application uses dlsym() to locate the "master" symbol. For example, an
exported data structure could contain a count and an array of substructures that
contain information about each available function, including a function pointer and
an encoding of its purpose, result and parameter types. Of course, these
descriptions are limited by the conventions established between application and
DLL programmers, but can be as flexible as the programmers make them.
Because these structures include the function pointer, the individual functions need
not be exported from the DLL; the application need not know their actual names or
use dlsym to find them.
All of this can be done without changing or even stopping and restarting the original
application.










