The .NET solution loancalc.sln contains the following of interest:
The COBOL application comploan\compdll.app contains the following programs:
- comploan.cbl. This is the existing OO COBOL source for the COM object. The code is based on the original CompLoan demonstration in Net Express. It has been updated to include a type library, which is required for COM objects in the .NET environment.
- comploanTrigger.cbl. The is the legacy trigger program. This is unchanged for interoperating with .NET.
- comploan\debug\comploan.dll. This is the built COM object. This is not shipped because you will create it when you compile the project.
To run the example:
- In Net Express, compile the project compdll.app to create the COM object.
- Register the COM object at a command prompt. To do this, go to the folder where you created the COM object, comploan.dll, and type:
regsvr32 comploan.dll
- In Visual Studio, close the solution loancalc.sln and reopen it to pick up the newly referenced COM object. You can see it now listed without the warning triangle.
- Build the solution and step through it.