Using AcuToNet.dll Interface

To enable your COBOL programs to interface with languages such as C#, the .NET Framework requires that any variables passed to the framework from the COBOL program are marshalled. From extend version 9 onwards, marshalling and .NET support is handled internally. However, if you experience problems with this, you may revert to the previous method of using the AcuToNet.dll interface by following these steps from a command prompt:

  1. To register AcuToNet.dll for use with the .NET Framework, navigate to C:\Program Files (x86)\Micro Focus\extend x.x.x\AcuGT\bin, and enter one of the following commands:
    regasm20acu /register /codebase AcuToNet.dll
    regasm40acu /register /codebase AcuToNet.dll
    Note: regasm20acu is compatible with .NET Framework 2.0 and later, and regasm40acu is compatible with .NET Framework 4.0 and later.
  2. To register the marshalling executable required for COBOL to interop with .NET, whilst in the same location, enter the following command:
    marshal.exe /RegServer
    Note: This file is automatically registered during product installation. Manual registration such as this will be required if you have copied the extend software from one machine to another.
  3. When running your COBOL program, use the - -a2n runtime option.