### Using Executable Modules from VisualAge for C++ Version 3.5 or Earlier

There may be situations in which you need to use executable modules (either dynamic link libraries or executable files) created with IBM C and C++ Compilers in combination with those created using VisualAge for C++ Version 3.5 or earlier. In this case, processes that had a single run-time environment when compiled with VisualAge will now have multiple run-time environments, which imposes certain restrictions:

- You cannot use memory management across run-time environments. For example, if you call malloc to allocate storage in one run-time environment, you cannot call free or realloc in a different run-time environment.
- You cannot use exception handling across run-time environments. For example, you cannot call throw in one environment and call catch in another.
- You cannot use I/O across run-time environments. For example, if you open a file or a stream in one run-time environment, you cannot close it in another.
- You cannot use putenv or setenv across run-time environments.

You can overcome these restrictions by using the DLLRNAME utility to forward references to the old run-time environment, to the new run-time environment. To do this, you need to use DLLRNAME to change the older module to use the forwarding DLLs provided with IBM C and C++ Compilers:

Windows Forwarders |  | OS/2 Forwarders
Forwarder Name | Library Type |  | Forwarder Name | Library Type
CPPYMI36.DLL | Multithreaded |  | CPPXM36.DLL | Multithreaded
CPPYSI36.DLL | Single-thread |  | CPPXS36.DLL | Single-thread

In the example above, yang.dll is using the single-threaded library from VisualAge for C++ Version 3.5 for Windows. In order for the processes in ying.exe and yang.dll to use the same run-time environment, you would need to issue the following command in DLLRNAME:

    dllrname yang.dll cppws35i=cppysi36

If you do not know which run-time environment your module uses, you can rename both libraries with one command:

    dllrname your exe/dll cppws35i=cppysi36 cppwm35i=cppymi36

    dllrname your exe/dll cppos30=cppxs36 cppom30=cppxm36

After you issue this command, all the processes depend on a single run-time environment:

Demangler DLLs
If you are using a demangler DLL from VisualAge for C++ Version 3.5, you will have to rename it. The demangler DLL is CPPRDI36.DLL. The DLLRNAME command is:

    dllrname your exe/dll demangli=cpprdi36

Using Object Files from VisualAge for C++ Version 3.5 or Earlier