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.
Main-Pb-1-Ex-Cmd-Clicked.
call "@[DISPLAY]:C:\\acuthin\\DLLtest1.dll@WINAPI".
call "@[DISPLAY]:DLLtest1.Class1".
* call "@[DISPLAY]:Class1".
* call "@[DISPLAY]:@DLLtest1.DLLtest1.Class1".
cancel "@[DISPLAY]:DLLtest1.dll".
.
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)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace DLLtest1
{
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
OBJECT @ASSEMBLY
NAME "@DLLtest1"
VERSION "1.0.0.0"
CULTURE "neutral"
STRONG "null"
* FULLY-QUALIFIED-NAME DLLtest1.Class1, DLLtest1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
* DLLtest1.Class1
NAMESPACE "DLLtest1"
CLASS "Class1"
MODULE "DLLtest1.dll"
CONSTRUCTOR, 0, @CONSTRUCTOR1
I’m running thin client from a Linux server, and acurcl and Linux runtime are both 9.1.2.1. 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.


