To call native COBOL as a COM Object

  1. Package the native COBOL as a COM object.

    Note that in .NET, COM objects must have a type library.

  2. Register the COM object using the command:
    regsvr32 myCOMObject.dll
  3. Add the COM object to your Enterprise Developer project as a reference. To do this:
    1. Right-click References in Solution Explorer.
    2. Click Add reference.
    3. Browse to your COM object and select it.
  4. In your managed code, invoke the COM object in the same way as any other managed object. The following example invokes the Calculate method on the object theLoanCalculator:
    invoke theLoanCalculator::"Calculate"