The .NET COBOL Customer + .NET WinForm sample ManagedCustomerWinForm.sln puts together the .NET COBOL Customer sample and the .NET Order Forms dialog that is used in the Customer + WinForm sample. These two together form a sample where all the COBOL is compiled to .NET and the Dialog System user interface remains in native code. The following diagram illustrates this.
The advantage of moving all the code to .NET means that the native/.NET COBOL interoperation through COM is no longer relevant, which simplifies the sample greatly. Compare this sample with the Customer + Win Form sample.
To create this sample:
Call-Dialog-System SECTION. CALL dialog-system USING ds-control-block, customer-data-block omitted
invoke type OrderFormsLibrary.FormsFactory::CreateOrderForm (by reference CUSTOMER-DATA-BLOCK)
This differs from the Customer + Win Form sample which uses native/.NET COBOL interop through COM to pass the data between the main customer program and the new Order form.
From the .NET COBOL side, the Order form no longer has to use .NET marshalling to get the data and can remove the COM interfaces previously used to communicate with native code.