The supplied PInvoke sample demonstrates Platform Invoke. 
  
 
    See the 
      Pinvoke example, which is with the 
      Visual Studio 
       examples. This example contains the following of interest: 
    
 
     
      - Pinvoke.cbl. This program is managed COBOL. It uses the standard COBOL CALL statement to call the 
        sub program and to send it the message buffer to display, as follows: 
               call "SUB" using messageBuffer 
- sub.dll. This program is existing native COBOL. 
        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: 
    
 
     
      - Build the solution by clicking 
        Build > 
        Build pinvoke. 
      
- Step through the program, using 
        Debug > 
        Step into.