Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE

ASP.NET application gets RTS error 174 - "Imported File not found" when calling unmanaged COBOL .dll

ASP.NET application gets RTS error 174 - "Imported File not found" when calling unmanaged COBOL .dll

Problem

Customer has created an ASP.NET Web Application in Visual COBOL which needs to do a P/Invoke call to an unmanaged COBOL program by using the following code:

01 pp   procedure-pointer.
01 next-prog   pic x(20)   value "myentry".

    set pp to entry "DECHANGE"
    call next-prog

This works fine if the program is debugged using the Visual Studio interner Development Web Server but when the Web Server is changed to use Local IIS instead the following error message is displayed when executing the set pp to entry ... statement:

Why?

Resoulution:

This error occurs because when running under IIS you must link the unmanaged COBOL .dll as dynamic instead of Shared on the COBOL Link option tab of the Project Properties page.

This is because the search mechanism for the COBOL run-time system cblrtsm.dll is different when run under IIS. The error occurs because the run-time system cannot be found.

When linking the program as Dynamic it will use the Visual COBOL registry settings in order to locate the COBOL run-time system instead of requiring it to be within the system PATH.


 

DISCLAIMER:

Some content on Community Tips & Information pages is not officially supported by Micro Focus. Please refer to our Terms of Use for more detail.
Top Contributors
Version history
Revision #:
1 of 1
Last update:
‎2013-04-03 07:02
Updated by:
 
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.