Quantcast
Channel: Visual COBOL Knowledge Base
Viewing all articles
Browse latest Browse all 214

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

$
0
0
Current Revision posted to Visual COBOL Knowledge Base by Angela on 4/3/2013 6:02:26 AM

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.


 


Viewing all articles
Browse latest Browse all 214

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>