You are now ready to register the .DLL using the Windows Regsvr32.exe program. You can do this by going to a DOS command line and typing:
C:\COMDOC> Regsvr32 FILEIO5.DLL
Where: C:\COMDOC is the directory containing your FILEIO5.DLL file.
If you are going to work with COBOL COM modules often, you may wish to add an entry to call Regsvr32.Exe from the COBOL Project Manager Tools pulldown menu.
You can do this by selecting the Customize Menu option under the Tools pulldown menu, and then clicking on the Add button in the dialog box that appears. Give it the name Regsvr32 in the Name on Menu field. You then choose the Regsvr32.Exe file by navigating to the C:\Windows\System32 subdirectory (or C:\WINNT\SYSTEM32 under Windows NT and Windows 2000) and selecting it in the Execution File field. Make sure you also select the “Selected Files” option in the Arguments field. This will allow you to select a .DLL file in the project hierarchy and then select the Regsvr32 option you added to the Tools pulldown menu and it will feed the name of the selected .DLL file into Regsvr32.
One you execute Regsvr32.exe on FILEIO5.DLL, you should receive the following dialog box indicating a successful registration.
Figure 3.9 The Regsvr32.EXE successful registration dialog box
You are now ready to use FILEIO5.DLL as a COM component. We will next modify the TESTFILEIO5 program to be a COM Client that will invoke the FILEIO5.DLL COM component.