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 wRTOS environment. They cannot be called from a Windows application.

Because RTDLLs do not require linking to an explicit export library, they provide a convenient and flexible runtime method for changing RTDLLs or applications. Additionally, because RTDLLs are not wRTOS processes, it is not reliable to use C runtime functions within an RTDLL loaded by more than one wRTOS 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.

Related topics: