Here is a console application that calls C1COMMAND5
--------------------
using System.Runtime.InteropServices;
using System;
class PInvoke1App
{
[DllImport("H:\\c1\\demof472\\demom471.dll")]
static extern string C1COMMAND5(string strCaptiona, string
strCaptionb, string strCaptionc, string strCaptiond, string
strCaptionde, string strCaptiondf);
public static void Main()
{
string ret = C1COMMAND5("CMDTEST5", "PARM1", "PARM2", "PARM3",
"PARM4", "PARM5");
Console.WriteLine("Return Value: " + ret);
}
}
--------------------
When this application is run from a DOS prompt this is what you should
see:
c:\test>consoleapplication
Return Value: CMDTEST5 PASS1 PASS2 PASS3 PASS4 PASS5
c:\test>