DLL Programmer's Guide for TNS/R Systems
Contents
DLL Programmer’s Guide for TNS/R Systems—522203-002
iii
3. Dynamic Use of DLLs
3. Dynamic Use of DLLs
Dynamic Loading Functions 3-1
Opening a DLL from a Running Loadfile (dlopen) 3-2
dlopen’s Mode Parameter Values 3-3
Returned Value of dlopen 3-4
Accessing Symbols (dlsym) 3-5
Returned Values of dlsym 3-5
Closing a Running Loadfile’s Handle to a DLL (dlclose) 3-6
Returned Values of dlclose 3-6
Error Reporting For Dynamic Library Calls (dlerror and dlresultcode) 3-7
Error Text : dlerror 3-7
Error Encoding: dlresultcode 3-7
Thread Considerations 3-8
Using Dynamically Loaded DLLs to Extend an Application 3-8
4. Finding Symbol Definitions
The loadList 4-1
Global Scope, Import and Export 4-3
Import Controls and SearchLists 4-5
The SearchList for a Localized Loadfile 4-5
The SearchList for a Globalized Loadfile 4-8
The SearchList for a Semi-Globalized Loadfile 4-11
Import Control Summary 4-11
C++ Considerations:
Globalized (Gblzd) Symbols 4-12
System Library and Millicode 4-13
Symbol Resolution at a Glance
4-13
Example: Intercepting an Exported Symbol
4-13
5. Advanced DLL Facility Controls
Linker Input Controls 5-1
Making the Linker Accept Only DLLs or Only Archives 5-1
Augmenting Library Names Automatically in Searches 5-2
Handling Duplicate Symbols among Linkfiles in a Link 5-2
Making the Linker Look for Unresolved Symbols 5-4
Linker Output Controls 5-4
Designating the Main Entry Point of Your Program 5-4
Controlling Which Symbols Your Loadfile Exports 5-5
C++ Mangled Symbol Names 5-5