Overview

.NET COBOL is fully managed code. It provides these interoperability features:
  • .NET COBOL can be combined with code in any other .NET language, such as C#, F#, and VB.NET
  • A large amount of existing COBOL can be compiled as managed code
  • Existing COBOL can be left as unmanaged code and invoked by other .NET languages through small proxy .NET COBOL classes
  • Existing unmanaged code can invoke other .NET classes, through COM
Microsoft provides the following mechanisms (among others) for interoperating with unmanaged code:
  • For managed code calling unmanaged COBOL, you can use:
    • Platform invoke. This is similar to an API call. It enables managed COBOL to use the COBOL CALL statement to call unmanaged COBOL that is built as a .dll. See the Visual Studio Help topic on Consuming Unmanaged Code.
    • COM Interop, using a runtime-callable-wrapper (RCW). This is OO style and enables the COBOL CALL statement to call unmanaged COBOL that is packaged as a COM object. See the Visual Studio Help topic Runtime Callable Wrapper.
  • For unmanaged COBOL calling managed code, you use COM Interop, using a COM-callable-wrapper (CCW). This wraps the managed code as a COM object so that the unmanaged COBOL can call it like any other COM object. See the Visual Studio Help topic COM Callable Wrapper.

The following functionality is not supported: