Loading a DLL implicitly

When an application uses functions or variables defined in a DLL, the compiled code loads the DLL. This implicit load is transparent to the application. The load establishes the required references to functions and variables in the DLL by updating the control information contained in function and variable descriptors.

If a C++ DLL contains static classes, their constructors are run when the DLL is loaded, typically before the main function runs. Their destructors run once after the main function returns.

To implicitly load a DLL from C or C++, do one of the following:
To implicitly load a DLL from COBOL, do one of the following:

When the first reference to a DLL is from static initialization of a C or C++ variable pointer, the DLL is loaded before the main function is invoked. Any C++ constructors are run before the main function is invoked.