In dynamically bound applications that are built as native COBOL code, the order in which programs are loaded affects which run-time systems are searched for and the use of the run-time system. For example:
A "first" COBOL .dll file is the first loaded component of an application that needs a COBOL run-time system for execution. In the following description, the term ".exe file" also implies the term "first .dll file".
When the application runs, the .exe file locates and loads a compatible run-time system, depending on how the application was linked. If the application was:
When you create a dynamically bound executable file you can specify what level of run-time system the executable file is allowed to work with. This enables you to specify that the executable can work with any newer version of the run-time system than the one you linked it with, or whether the executable is restricted to the current release of the run-time system only.
The level and threading mode of a run-time system is checked as follows:
\HKEY_LOCAL_MACHINE\SOFTWARE \Micro Focus\Visual COBOL\x.y\COBOL\Environment\PATH
where:
If the executable was restricted to the current release level when it was created, x.y must be greater than or equal to the development system version with which the executable was created.
In any case, when the run-time system has been loaded a version and type check is performed and any incompatibilities reported.
When a second or further .dll file is loaded into a same process, it must bind to the existing run-time system within the process. If you create an application that does not use dynamic binding, then you must make sure that all programs in an application are linked to the same run-time system, otherwise conflicts could occur that would result in the application failing.
If you use dynamic binding when you create the second or further .dll files in your application then you can specify that they will either bind to any loaded and compatible run-time system, or will fail cleanly with informative diagnostic messages.