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.
You might try using a DISPLAY command instead of CREATE or @DISPLAY. We use controls from a few different companies. One set of controls we use is from Chilkat Software. When we use their Zip control with a CREATE command then try to use functions defined in the .DEF, we get an error. If we use DISPLAY instead, the functions work properly.
We only run on Windows, so I can't address potential issues with Windows thin client connected to a Linux/Unix server. However, in order to use the controls from a thin client, we have everything registered locally. While we've used AcuCOBOL from within a .NET program, we haven't had a need for calling a .NET control from AcuCOBOL, so I don't know what difference that may make.
In the WORKING-STORAGE SECTION.
77 CK-Zip USAGE IS HANDLE OF ChilkatZip2.
01 CK-Zip-Status USAGE IS SIGNED-LONG.
01 CK-Err-Desc PIC X(10000).
01 NFLD6-1 PIC 9(6).
01 NFLD6-2 PIC 9(6).
In the PROCEDURE DIVISION.
* Create handle for control
DISPLAY ChilkatZip2 HANDLE IN CK-Zip
LINE 1 COL 1 LINES 1 SIZE 1, VISIBLE 0,
EVENT PROCEDURE IS CK-ZIP-EVENT.
For functions and values within the control, we use MODIFY and INQUIRE
MODIFY CK-Zip @UnlockComponent("xxxxxxxx")
GIVING CK-Zip-Status.
IF CK-Zip-Status NOT = 1
INQUIRE CK-Zip @LastErrorText() in CK-Err-Desc
DISPLAY MESSAGE BOX CK-Err-Desc
EXIT PARAGRAPH
END-IF.
CK-ZIP-EVENT.
evaluate event-type
when MSG-VALIDATE
CONTINUE | Can log events here
when MSG-AX-EVENT
evaluate EVENT-DATA-2
when ChilkatZip2UnzipPercentDone | 1
* 2 Parameters
* "long percentDone"
* "long* abort"
IF SHOW-STATUS = "Y"
CALL "C$GETEVENTDATA"
USING CK-Zip, NFLD6-1, NFLD6-2,
GIVING RESULT-CODE
END-CALL
* Use value returned in NFLD6-1 to update progress bar...
END-IF
end-evaluate
WHEN OTHER
DISPLAY MESSAGE "Zip event triggered - ", EVENT-TYPE
END-EVALUATE.
Finally, when we are finished with the control, we destroy it.
DESTROY CK-Zip.
If this works, you could write a program that checks for and validates the version of the local control(s) on the remote thin client. If a new one is available, it would then download and register the updated control so you can take advantage of fixes and enhancements to your control.
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 able to get your dll with the CREATE statement on a Linux server and Windows Thin client, turns out FILE-PATH is the key. In the COBOL program
78 W-FILE-PATH VALUE "TEST.xml".
create "dotnet35_add"
namespace is "dotnet35_math"
class-name is "AddIntClass"
FILE_PATH is W-FILE-PATH
constructor is constructor1()
handle is dotnet-math-add-handle.
Test.xml needs to reside in the runtime bin directory. My TEST.xml had this:
<?xml version="1.0"?>
<FILE_PATH>ip address of client :path-on-client-where dll-resides</FILE_PATH>
so in my case it was
<?xml version="1.0"?>
<FILE_PATH>10.24.99.62:C:\\RUNDLL</FILE_PATH>
I put the object file and TEST.xml in my Linux runtime bin, made an alias and was able to execute from my Windows client.
Hoorah!!!
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.
Once again, thank you for the continued help and input on this issue. However it did not work for me. In my case this is the contents of the dotnet35.xml file I created and placed beside runcbl.
<?xml version="1.0"?>
<FILE_PATH>192.168.3.110:C:\\acuthin\\9.1.2.1</FILE_PATH>
I first attempted with the server I've been using all along however that is remote to my location (with corresponding external IP). Thinking that might be the problem, I installed to an archive server I have on the same network inside the router here but I still see the identical error.
Did you do anything to your windows machine to make this possible? I temporarily opened my windows firewall but even with that, I don't understand how the above can work without a SAMBA share or something like that. To share a directory with another windows PC on my network already requires more than a few settings. I don't see how the file_path line above is enough to give runcbl running on the linux server permission to access files on my C drive without a valid user name and credentials.
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 tried this
<FILE_PATH>@[DISPLAY]:C:\\rundll\\</FILE_PATH>
and it works ... YAHOO!
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.
We set this up on a new machine and here is what we noticed. We made a C:\\runit directory. When executing acuthin, the first issue was the TEST.xml (or the file identified in the FILE_PATH variable) needs to be in the C:\\runit directory where you are executing acuthin. Next, you need to have dotnet32_add.dll in the same directory as acuthin as well. My guess so far is that @DISPLAY is pointing to the acuthin directory, so you canāt have @DISPLAY:C:\\some-other-directory
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 went back and deleted everything from the server and started over to make sure I hadn’t missed a step anywhere but I’m getting the same behavior.
Is there a way to get additional debug information for “create”? Whether I remove the xml file, cause syntax errors or misspell the value so it doesn’t match what is out there at no point do I get any error besides “Thin client has stopped working”. Adding “NET_FILE_TRACE 1” to the config file doesn’t create that log file and the standard trace has nothing either. I figure at some point in the last couple weeks I should have made a change that would at least return a different error.
Below is my complete setup.
Linux Server
/usr/bin:
Contents: runcbl, acurcl
/home/companies/test_rundll (program directory)
Contents: RUNDLL.acu, runcbl.cfg
Acurcl alias record details:
Enter the alias name: rundll
Working directory: /home/companies/test_rundll
-c runcbl.cfg RUNDLL.acu
Client
C:\\acuthin\\9.1.2.1:
Contents: Acuthin.exe, dotnet35_add.dll, dotnet35.xml
Shortcut Target:
C:\\acuthin\\9.1.2.1\\acuthin.exe 192.168.3.114 rundll
Dotnet35.xml
<?xml version="1.0"?>
<FILE_PATH>@[DISPLAY]:C:\\acuthin\\9.1.2.1</FILE_PATH>
RUNDLL.CBL
IDENTIFICATION DIVISION.
PROGRAM-ID. RUNDLL.
ENVIRONMENT DIVISION.
CONFIGURATION SECTION.
SPECIAL-NAMES.
copy "dotnet35_math.def".
.
WORKING-STORAGE SECTION.
78 W-FILE-PATH
VALUE "dotnet35.xml".
77 int1 signed-int value 10.
77 int2 signed-int value 27.
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"
file_path is W-FILE-PATH
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.
Do you have a sample program (like tour.cbl) running via Thin client and AcuRCL on Linux? If not, doing so gets us past the AcuAccess file, firewall and permissions types of issues. Are you using the standard port 5632 for acurcl.? From the client can you run acuthin --ping 192.168.3.114? that is acuthin dashdashping 192.168.3.114
If all of these things work, I believe the dotnet32.xml also belongs on linux in the runtime bin directory. Once compiled in debug, you can run the alias with debug via acuthin. acuthin 192.168.3.114 -d rundll
step though the program and see if it fails on the create.
You may want to kill acurcl, check acushare to see if all licenses are available, start acurcl again and do the ping to see if acurcl is responding. Then try a sample program and then your rundll alias.
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 have a duplicate of our system running on this server from another data directory. A "--ping" shortcut shows alive with a round trip of 0.02 seconds.
I had removed the xml from the Linux bin directory and placed with the exe on the client but have now placed it back in the Linux bin as well. My original test link was with debug and I was able to trace to the error being at Create. I even just placed some "display message" lines before and after to verify the program is running and where the error occurs and it is on create.
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.
Okay, I was able to get the Thin client has stopped working message. I had a 9.1.2.1 acuthin and the dlls that come with it installed. I then went in and installed the COBOL virtual machine (the runtime) as well. I did not add in any licenses on the client. This now works, the C# executes on the client.I hope this works for you 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.
Bingo. This is my dev machine and I have the 9.0 development environment installed. I simply took the 9.0 bin directory and placed it where my thin client resided then loaded the 9.1.2.1 thin client back on top of that and it worked.
I'm going to move all of this to another machine that isn't licensed for the windows runtime to simulate one of our customers and see if it all still works and also take out the pieces we tried one by one to see which are explicitly required.
Thank you again!
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 I have this sorted out. In addition to a typical Thin client install,you need these additional runtime files:
AcuToNet.dll
AcuToNet.tlb
CLRControlModule.dll
Marshall
plus your dll and xml 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.
A thin client today is a compact piece of computing technology that accesses data remotely through a connection to a server and brings a virtual desktop to the user.
thin clients
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 is what our thin client provides. It is a small executable that allows a COBOL user interface to run locally when the program is executing on a remote server (Windows or Unix).
see .. www.microfocus.com/.../acuconnect-data-sheet-1133.aspx