Installation into C++ Builder/Delphi 2007, 2009 and 2010

To install Serial Port ActiveX Control into C++ Builder/Delphi 2007, 2009 and 2010 follow these instructions:

1. Create a new package: File –> New –> Package.

2. Save this package with “sport” name: File –> Save Project As… If you are installing Serial Port ActiveX Control into C++ Builder and Delphi of the same version simultaneously, name the packages sport_bcb and sport_delphi correspondingly.

3. Choose Component –> Import Component, and click “Import ActiveX Control” radio button. Click “Next” button to continue:

delphi1

4. Select ActiveX Control you want to be imported – Serial Port ActiveX Control in this case – and click “Next” button to continue:

delphi2

5. Tick “Generate Component Wrappers” checkbox. Be sure to remember Unit Dir Name, which by default is: C:\Documents and Settings\<user_name>\My Documents\RAD Studio\<version Delphi/Builder>\Imports\.

Then click “Next” button to continue:

delphi3

6. Now the created unit should be added to an active package. To achieve it click “Add unit to sport.dproj project” radio button. Then click “Finish” button:

delphi4

7. If you are OEM version user, “Registration” window will be invoked. Enter Name and Code you have received from us, and click “Register” button:

delphi5

If you are using Demo version of the program, you will get this message:

demo

To remove this notification, get the full version of the program.

8. Now install the package: right-click sport.bpl and choose “Install” option:

delphi7

9. Once the package is successfully installed, you will get a message about it:

delphi8

10. The next step is to save the package: File –> Save.

11. Now you can create your own application. Go to File –> New –> VCL Forms Application.

12. Find TSportAX in ActiveX section at Tool Palette and put it on a form.

delphi10

13. Compile your project and launch it. Error-free launch means that Serial Port ActiveX Control was installed correctly.

14. In C++ Builder you may be asked to specify Unit Dir Name: Project –> Options –> Directories and Conditionals –> Include path. Then click “…” button:

delphi11

15. Browse to the folder where component wrappers were generated to and click “Add” button. Then click “OK” button.

16. The path can be also specified globally for C++ Builder: Tools -> Options –> Environment Options –> C++ Options –> Path and Directories –> Include path. Then click “…” button.

Browse to the folder where component wrappers were generated to and click “Add” button. Then click “OK” button.

For more information see the example source code for Delphi and C++ Builder.

Notice:
If ActiveX control issues “Wrong license” error message each time you access it, then to fix this problem, please, open the package Serial Port ActiveX Control was installed to, remove SPortLib_TLB.dcr and SPortLib.pas files and rebuild the project. After that reinstall Serial Port ActiveX into the project again.