See the Pinvoke example, which is with the examples. See Start > All Programs > Micro Focus Enterprise Developer > Samples > Visual COBOL Samples. This example contains the following of interest:
call "SUB" using messageBuffer
The built sub.dll is included as a reference in the project, whereas the source file sub.cbl is not included, because it is native code and not compiled as part of the project. You can view the source file by opening it from the File menu.
To run the example: