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.
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.
The zip file did not include your dll, so I could not fully test. I would change the call "@[DISPLAY]:C:\\acuthin\\DLLtest1.dll@WINAPI". to call "@[DISPLAY]:C:\\acuthin\\DLLtest1.dllI". the @WINAPI really does apply to a dll that you are making. I would test on Windows first, and the calls would need to change from call "@[DISPLAY]:C:\\acuthin\\DLLtest1.dll". to call "DLLtest1.dll". I would test and get it working on Windows and then go with the @(DISPLAY) syntax and deploy on Linux via acurcl.
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.
As far as the second call ... change call "@[DISPLAY]:DLLtest1.Class1". to call "Class1"
The first call loads the dll, subsequent calls call the functions in the dll.
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.
Thank you for the feedback, I’ve removed the “WINAPI” reference. I went ahead and made a new program to run locally as well and included a few changes to make it easier to specify where the DLL is kept, although I still receive the same error. The initial call works, but the actual function/method call fails.
If it’s helpful I made another zip that includes DLLTEST2.CBL, DLLtest1.dll, and the full Visual Studio project of the program I wrote to test the DLL outside of COBOL.
IDENTIFICATION DIVISION.
PROGRAM-ID. DLLTEST2.
WORKING-STORAGE SECTION.
78 DLL-LOCATION value "C:\\acuthin\\".
78 DLL-NAME value "DLLtest1.dll".
77 call-string pic x(120).
LINKAGE SECTION.
PROCEDURE DIVISION.
Program-Begin.
perform Call-DLL.
Program-End.
stop run.
.
Call-DLL.
string DLL-LOCATION DLL-NAME delimited by size
into call-string.
call call-string.
DISPLAY MESSAGE "1: Calling Method: Class1".
call "Class1".
DISPLAY MESSAGE "2: Call Successful".
cancel "DLLtest1.dll".
.
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.
Apologies if I sent you in the wrong direction. Let's take a look at why the call to KERNEL32.DLL works, whereas the call to Class1 does not. In call KERNEL32.DLL, you call the dll and then call a function that returns a parameter :GetVersion" GIVING myDWord.. In call DLLtest1, you are doing something very different, you are calling a dll and then asking for the dll to display a response DialogResult result = MessageBox.Show. There are a couple of different ways a COBOL program can interact with .Net. If the dll provides a UI (as in this case) the AcuGT\\sample\\dotnet\\NETOBJECTS is a good example of this. The netdefgen copy book provides the runtime with the methods that can be called, but we use the Display, Modify, and Inquire verbs within COBOL to interact with the .Net assembly. If the .Net assembly does not have a UI, then we use the Create, modify and inquire verbs within COBOL to interact with the .Net assembly. The AcuGT\\sample\\dotnet\\compositecontrol andAcuGT\\sample\\dotnet\\amortontrol are other examples of the runtime interacting with a .Net assembly.
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.
That makes more sense. I wasn’t actually thinking of the message box as being a UI and thought it would be the simplest example to create.
Also reading a bit more I see that the “call dll” syntax is only for native code DLLs, not the MSIL kind I would be creating in C#. Using the sample compositecontrol as an example I restarted from scratch writing something without a UI to test.
I made a small DLL to add 2 passed in integers, a form program to test, and then a COBOL program to test as well.
After placing the DLL in the same directory as wrun32.exe I was able to call it from my COBOL program using “create” and everything worked great.
However it doesn’t work when run through thin client. The program fails on “create” but returns no error. It simply says “extend thin client has stopped working”.
I rebuilt everything in a standalone Acubench project to make sure existing compile switches weren’t an issue. I’ve attached a zip that includes the complete project including the .NET projects and source.
IDENTIFICATION DIVISION.
PROGRAM-ID. RUNDLL.
ENVIRONMENT DIVISION.
CONFIGURATION SECTION.
SPECIAL-NAMES.
copy "dotnet35_math.def".
.
WORKING-STORAGE SECTION.
77 int1 signed-int value 10.
77 int2 signed-int value 25.
77 int3 signed-int value 0.
77 dotnet-math-add-handle usage handle of object.
PROCEDURE DIVISION.
Program-Begin.
perform Call-DLL-Add.
Program-End.
exit program.
stop run.
.
*
Call-DLL-Add.
create "dotnet35_add"
namespace is "dotnet35_math"
class-name is "AddIntClass"
constructor is constructor1()
handle is dotnet-math-add-handle.
modify dotnet-math-add-handle "@Add" (int1, int2)
giving int3.
display message int1 " " int2 " = " int3
title "Result".
.
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.
Excellent work. Now,on the machine where you are running thin client,have you registered your C# assembly? regsvr32 <ocx or dll name>
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.
I had not run regsvr32. Checking the documentation it seems that it is used to register an ActiveX control as a COM object? In my case I’ve created a .NET Assembly. Today I attempted to run regsvr32 just in case that is necessary for both and I receive the error “DLL was loaded… DllRegister Server entry point was not found. “
Reading up on that and finding another post on the forum it seems that regasm.exe is what I need to run to register the .NET assembly as a COM component? So I’ve also now done the following.
• Signed the assembly with a strong name.
• run regasm.exe on the dll.
• Rerun NETDEFGEN on the dll creating a new .def which now references the “STRONG” value.
• Run Marshal [dll] – I’m not sure what this step is for, I couldn't find any reference in the documentation, but I saw it recommended in another forum post.
Tested after all the above and it still works local with wrun32.exe but no change to behavior when run with acuthin.exe.
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.
I thought the regsvr32 would do this. For .Net you need to have the assembly avaible in the Global Assembly Cache (GAC) ... here's an article about that
msdn.microsoft.com/.../dkkx7f79(v=vs.110).aspx
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.
I did this using the command >gacutil -i c:\\acuthin\\9.1.2.1\\dotnet35_add.dll. I was able to verify that it was there with >gacutil /lr dotnet35_add. This returns the below.
Microsoft (R) .NET Global Assembly Cache Utility. Version 4.0.30319.33440
Copyright (c) Microsoft Corporation. All rights reserved.
The Global Assembly Cache contains the following assemblies:
dotnet35_add, Version=1.0.0.0, Culture=neutral, PublicKeyToken=9fd5883bc1343728, processorArchitecture=MSIL
Number of items = 1
I still have the same issue with not working in thin client with no actual error message. One thing I noticed in reading on the GAC it seems that this would actually only be necessary if I wanted to use the DLL without having it in the same directory as the executable no?
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.
I believe that is true, it should work without GAC if your dll is in the same directory as thin client (acuthin.exe).
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.
Yep, I've made sure to put the DLL in the same directory each time I've changed. I also ran the regasm on it while in that directory after distributing.
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.
The last thing I could think of is that the Create statement does allow for a file-path ...
Format 2
CREATE assembly-name creates a non-graphical .NET object.
CREATE "assembly-name"
NAMESPACE { IS } "namespace"
CLASS-NAME { IS } "class-name"
HANDLE { IN } object-handle
{ IS }
EVENT PROCEDURE { IS } "event-proc"
Remaining phrases are optional.
VERSION { IS } "version"
CULTURE { IS } "culture"
STRONG-NAME { IS } "strong-name"
CONSTRUCTOR { IS } CONSTRUCTOR
parameters...
MODULE { IS } "module"
FILE-PATH { IS } "file-path"
Perhaps adding FILE_PATH will resolve this for Thin client.
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.
file-path is the path of an XML file, and that XML file contains the path where the .NET assembly is located. Use FILE-PATH when the assembly that you want to access does not reside in the GAC or in the same directory as wrun32.exe. Assemblies that reside in the GAC will have the STRONG keyword in the NETDEFGEN COPY file.
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.
I believe it is possible for your.Net assembly to reside on the server where the runtime is executing .. even for thin client...
Format 1
CREATE object-name creates a COM object.
CREATE object-name
HANDLE { IN } object-handle
{ IS }Remaining phrases are optional.
SERVER-NAME { IS } server-name
{ = }
LICENSE-KEY { IS } license-key
{ = }
EVENT PROCEDURE IS { proc-1 [ {THROUGH} proc-2 ] }
{THRU }
{ NULL }
In a Thin Client environment the customer may also specify the server-name with the prefix, Local: e.g. CREATE COM_object SERVER-NAME "Local:the_server_name". In this case the COM object is wholly instantiated on the specified server where the COM object is registered, all the work is done and all resources must reside.
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.
Thanks, I will try out the FILE-PATH and see what I get. I can't do the server-name because acuconnect is actually running on a Linux server. The client is the only piece running windows in our structure.
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.
I was looking at the CREATE statement to see how this can be done, and I noticed this caveat .. . CREATE cannot be used to create an object on a non-Windows server such as UNIX or in this case Linux. For .Net yu have to use a Windows server in some fashion.
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.
Oh my. Isn't that what the "@[DISPLAY]" syntax does in the other documented DLL calls through thin client?
Also can you point me to where you found the above info, and does MicroFocus have any alternate recommendations? Changing the server environment is pretty much the one thing I can't change.
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.
From the documentation on "CREATE" I found the following.
Note: CREATE can be used with thin client applications to create instances of an object on the client or on remote Windows servers. CREATE cannot be used to create an object on a non-Windows server such as UNIX or VMS; however, non-Windows servers running AcuConnect can provide connectivity to Windows servers in a multitiered configuration.
It makes sense to me that I can't create the object on our Linux server, but I don't see the above saying the windows client from a Linux server can't create the object.
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.
I believe that since CREATE is dealing with a non-GUI assembly that the runtime attempts to execute it on the server. Even with Thin client, the Windows runtime on the Windows server would execute the assembly and not the client. To answer the question about how you can move forward .. is the C# needed to be on each client machine? If so, then you really need to use a runtime on each client. If the C# can be run on a single Windows machine (server) then you could use AcuConnect Distributed Processing where most of your programs execute on Linux, and then a call to the remote program that runs the C# assembly. The @DISPLAY syntax was made for COM and/or ActiveX. I can see through this discussion, that CREATE should have a way to execute on a client.
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.
I read this as well .. CREATE can be used with thin client applications to create instances of an object on the client .. and the only way I could see this happening is through the use of FILE_PATH and the PATH being UNC so that the Windows server knows that the file exists on a Windows client. I think that is why there is the restriction for Unix/ Linux, the FILE_PATH cannot tell Linux that the file exists on a Windows client. Perhaps the FILE-PATH construct should support the @DISPLAY syntax but I do not believe it currently does.
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.
One other option, does your dll have to be C#, if it can be a C program then things get much easier, you can use the call and call @[DISPLAY]
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.
First off, thank you for all the input and suggestions on this post. In answer to a number of the questions:
Our use cases require it to be run where the client is, so a central Windows server working with Acuconnect wouldn’t work for us.
In one comment you wrote “…The @DISPLAY syntax was made for COM and/or ActiveX. I can see through this discussion, that CREATE should have a way to execute on a client. ” Does that mean if I converted this to a COM object I could do what I’m attempting to? It seems the @DISPLAY syntax is just for native code DLLs. When reading about the CREATE verb, both COM/ActiveX and .NET assemblies use the same syntax and therefore have the same limitations. However, if turning my C# DLL into a COM component allows me to use “call @DISPLAY” it seems that might be an option. I just want to clarify before I spend time going that route.
The DLL doesn’t have to be in C#, I just chose that based on having played with that before. If all else fails, one thing I could do is write something in C that my COBOL could call. It will do nothing but play middle man between the COBOL and the .NET assembly, where all the work is done.
The big thing I’m trying to do is keep integration seamless to the user. The last thing I want to do is call an exe on the client, and then manually check an output file after the fact.
Before I go any of these routes, is “There is no calling a .NET assembly using CREATE over thin client running on a Linux server” an official reply from Micro Focus, or simply how you read the documentation and my results?
Or should I address that to support for an official reply? I just need an explicit no go when I report back internally which path we need to take.
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.
I ran across some RMNet documentation this morning. Wasn't aware that existed. That might take care of our initial web service needs as well.
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.
I can't state that my reply is official, it is simply how I read the documentation, tried setting up your project and then seeing the results. I know that the Visual ActiveX / COM ocx / dlls or even a Visual .Net assembly that use the DISPLAY syntax work on the client in a Linux / Windows Thin client setup. What seems to be missing is the CREATE, or at least you and I haven't discovered how to leverage CREATE to do this. You can submit this issue to Customer Care so that Development can provide an official reply. In addition to RMNet there is BIS and XML extension in Version 9.
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.
Thanks again. I'll contact support and report back for future reference.