This article is reproduced in: http://www.codesky.net/article/200703/73615.html
Install and use the MsComm control in Delphi
Delphi features powerful functions, ease of use, and fast code execution. It is a world-recognized pioneer in fast application development tools and technologies.
Owner. However, Delphi's help documentation and other books seldom mention serial communication control, which is precisely when developing application systems.
Frequently encountered problems. Programmers who have used VB know that the MSComm communication control of VB has a wide range of attributes and events closely related to serial communication.
Provides a series of interfaces for standard communication commands, which can be used to create full-duplex, event-driven, efficient and practical communication programs. Here
This section describes how to add the ActiveX control MSComm to Delphi to give full play to their advantages.
First, find the following three files in the VB installation directory:
Mscomm. reg, Mscomm32.ocx, Mscomm32.dep,
Copy these three files to the Windows system directory (note that System32 is used in WinNT ). Then use the registration in Windows
The regsvr32 tool registers the OCX control, for example:
Regsvr32... System directory \ Mscomm32.ocx.
After successful registration, use NotePad to open Mscomm. reg. You can see the following content:
[HKEY_CLASSES_ROOT \ Licenses \ javase830-6ac2-11cf-8adb-00aa00c00905]
@ = "Kjljvjjjoquqmjjvpqqkqmqykypoqjquoun", to correctly use this control, you need to modify the Registry Information in
In the registry, create a primary key under HKEY_CLASSES_ROOT \ Licenses:
4250E830-6AC2-11cf-8ADB-00AA00C00905, the content of the primary key is
Kjljvjjjoquqmjjjvpqqkqmqykypoqjquoun.
Now that the system registration of the control has been completed, the rest of the work is to import the ActiveX control in Delphi,
Go to the Delphi environment and select Import ActiveX Control under the Component menu. Then, you can see it in the list.
Microsoft Comm Control 6.0 option. Select this option and click the Install button to complete the installation. In ActiveX
On the Control page, you can see a control with the phone number as the icon. This is the MSComm control. In this way
You have to use the MSComm control.
Copy the file to the system32 directory.
Click Start. Enter regsvr32 mscomm32.ocx
Enter to complete registration
I have encountered this problem. The upstairs approach is sometimes not feasible.
The solution is to modify the key value in the registry.
In "run": regedit // open the Registry
Create an item under HKEY_CLASSES_ROOT \ Licenses. The item name is 4250E830-6AC2-11cf-8ADB-00AA00C00905.
In the right pane, right-click 'AB (default)' and select "modify".
Enter kjljvjjjoquqmjjvpqqkqmqykypoqjquoun in the value data.