RTDLLs
This topic provides:
- Descriptions of real-time DLLs (RTDLL)
- C Runtime Libraries: Programming Considerations for DLLs
- References to RTDLL code examples
About RTDLLs
RTDLLs are RTSS objects that can be explicitly loaded or dynamically loaded and unloaded using the LoadLibrary and FreeLibrary calls. An RTDLL is automatically unloaded from memory when the last RTSS process referencing it terminates. RTDLLs are supported only within the RTX64 environment. They cannot be called from a Windows application.
Because RTDLLs do not require linking to an explicit export library, they provide a convenient, flexible runtime method of changing RTDLLs or applications. Additionally, because RTDLLs are not RTX64 processes, it is not reliable to use C runtime functions within an RTDLL loaded by more than one RTX64 process simultaneously. For further details about the relationship between C runtime libraries and RTDLLs see C Runtime Libraries: Programming Considerations for DLLs below.
NOTE: RTDLLs require a valid license to be built and run. If a valid license does not exist, the RTDLL will not be loadable. You license an RTDLL by stamping it with the StampTool utility.
C Runtime Libraries: Programming Considerations for DLLs
This section discusses considerations that you should keep in mind when designing an RTDLL that will be linked with the Microsoft Visual Studio C Runtime libraries (see C Runtime Library-Support API Overview ).
The Microsoft C runtime initialization code assumes that global variables have process scope, i.e., a separate copy of all C runtime global variables and structures exist for each process using the libraries. This is not true for RTDLLs.
See RTDLL Code Example in the RTX64 Example Reference.