An alternate way to provide COBOL services to a .NET assembly is through the ACUCOBOL-GT COM server.
The COM server is a COM object containing the ACUCOBOL-GT Windows runtime DLL. It provides a COM interface between the ACUCOBOL-GT runtime and programs running outside the runtime. For more information on the COM server, see Using the ACUCOBOL-GT COM Server.
When the COM server is added to a .NET project, .NET creates a proxy object, "Interop.AcuGTObjects.dll", that provides an interface between .NET and the ACUCOBOL-GT COM server object. The .NET proxy gathers data intended for use by the COBOL program and packages it in COM variant formats before sending it to the ACUCOBOL-GT COM server. This process is known as data marshalling. The COBOL program uses C$GETVARIANT and C$SETVARIANT to retrieve and update data held by the ACUCOBOL-GT COM server object. The proxy also unmarshals data received from ACUCOBOL-GT COM server before delivering it back to the .NET program. The proxy is designed to manage the interchange between the .NET and COBOL worlds.
Invoke an ACUCOBOL-GT program from a .NET assembly as follows:
Once the COM server is registered on the .NET system, the ACUCOBOL-GT runtime is then exposed to any program running in that environment.
Visual Studio generates a .NET proxy module to interface with your COM object identified as "Interop.AcuGTObjects.dll".
Visual Basic:
Dim AcugtInterface As Object AcugtInterface = New AcuGTObjects.AcuGTClass
C#:
AcuGTObjects.AcuGTClass AcugtInterface = new AcuGTObjects.AcuGTClass();
The ...\sample\dotnet\NetToAcuCobol directory contains a "ReadMe.txt" file that describes using the example with the "AcuGTObjects.AcuGTClass".