Calling .NET dll created with --netdll compiler switch

Hi

I have created a test project to test the "--netdll" compiler switch. I have the .dll and the _CVM.dll files created, and can reference them correctly into my VC project. I can also build the VC project without errors. But when calling one of the entry points, or the main, I only get an exception (I put the call in a try - catch - setting) saying "Index was outside the bounds of the array."

I have now tested one COBOL program that i have made on my own, and I have tried copy / paste of the COBOL program the C# code in the sample from the documentation. Both are returning the same exception.

I dont think the excecution is even getting to the code inside the COBOL .dll

I think the exception is triggered in the call before it gets so far.

Have anyone got this working?

Regards Dagl

Tags:

  • Your Visual Studio (version #) has AcuGT Objects reference and that it is resolved? You have the atest.cbl compiled and in the AcuGT\bin directory? You have the AcuGT runtime license in the AcuGT\bin directory?

  • Hi!

    I also raised this as an incident, and got answer for your support department. I had the wrong compiler version.

    I now have had the sample program running.

    But I look at the sampel code. Does this mean that you need a AcuCobol runtime to use this .dll`s ?

  • Yes, the CVM loads the Acu runtime. The dll you'made with our compiler is a file created to load the runtime and COBOL program, and the CVM is how we allow C# or other Microsoft languages access to the COBOL. Your COBOL program may do Open FILE-NAME, but the runtime is what gets the O/S to actually open the file.