I’m having trouble with a small test program I’ve written to call a DLL on the client over thin client. Using C# in Visual Studio I made a DLL with a class to display a Popup message box. I then wrote a small windows form application to test and I have no problem calling the DLL. I was unable to get NETDEFGEN to see the class until I noticed the documentation saying it needed to be .NET 3.5 or older, although it seems the thin client syntax doesn’t need that step anyway.
I then wrote a small COBOL program in Acubench to test the DLL. Using examples from the forum I created a couple push-buttons to test various functions and I was able to successfully call different kernel32.dll functions that were posted here in the past.
I then added a button to test the DLL I wrote. Below is the relevant push-button code.
* call "@[DISPLAY]:Class1".
* call "@[DISPLAY]:@DLLtest1.DLLtest1.Class1".
My problem is with the second call to the actual function. I receive a “Program missing or inaccessible” error, and I receive this error regardless of the syntax of the 3 calls I tested above. I removed the @[DISPLAY] syntax, ran locally on my test system through Acubench, and received the same errors.
Here is the source for the DLL that I created (DLLtest1.cs)
public class Class1
const string message = "Message Called in DLL";
const string caption = "Caption";
DialogResult result = MessageBox.Show(message, caption, MessageBoxButtons.OK, MessageBoxIcon.Information);
And here is the .def that NETDEFGEN made from it.
* ACUCOBOL-GT Version 9.0.0 .NET Copy Book - Generated On 1/4/2015 11:05:41 PM
* FULLY-QUALIFIED-NAME DLLtest1.Class1, DLLtest1, Version=188.8.131.52, Culture=neutral, PublicKeyToken=null
CONSTRUCTOR, 0, @CONSTRUCTOR1
I’m running thin client from a Linux server, and acurcl and Linux runtime are both 184.108.40.206. Compiler, Acubench, and windows runtime are 9.0.
I’ve created a small zip and included the .cbl of my test program, the .cs for the DLL, and the .def that NETDEFGEN generated from it.
Any help or thoughts would be much appreciated.