P
Parrot
I am attempting to import a DLL function from a COBOL program using the
DLLImport function but I always get an error that says the Specified module
(dtonsub.dll) cannot be found. I used the link program to determine if
there is a function by the name I am using. I have tried this with both
REALIA and Microfocus COBOL programs and get the same error. Can anyone
enlightened me on what the problem is? Below is my code.
Dave
[DllImport("dtronsub.DLL", EntryPoint = "DTRON1", SetLastError = false,
CharSet = CharSet.Unicode, ExactSpelling = false,
CallingConvention = CallingConvention.StdCall)]
public static extern void DTRON1(callparm1 c1, callparm2 c2, int x);
public Form1()
{
InitializeComponent();
callparm1 c1 = new callparm1();
c1.filedata = "12345";
callparm2 c2 = new callparm2();
c2.calldata = "abcd";
DTRON1(c1, c2, 0);
}
DLLImport function but I always get an error that says the Specified module
(dtonsub.dll) cannot be found. I used the link program to determine if
there is a function by the name I am using. I have tried this with both
REALIA and Microfocus COBOL programs and get the same error. Can anyone
enlightened me on what the problem is? Below is my code.
Dave
[DllImport("dtronsub.DLL", EntryPoint = "DTRON1", SetLastError = false,
CharSet = CharSet.Unicode, ExactSpelling = false,
CallingConvention = CallingConvention.StdCall)]
public static extern void DTRON1(callparm1 c1, callparm2 c2, int x);
public Form1()
{
InitializeComponent();
callparm1 c1 = new callparm1();
c1.filedata = "12345";
callparm2 c2 = new callparm2();
c2.calldata = "abcd";
DTRON1(c1, c2, 0);
}