Site icon Embarcadero RAD Studio, Delphi, & C++Builder Blogs

Flexible Comport DLL Library For Serial Communication On Windows

Serial Communications is a core communication between PC and peripheral devices Such as a programmable instrument or another computer. Do you feel challenged in writing code to communicate with serial devices from your Delphi/C++ applications? How about a DLL library which does the Serial Communication with better API controls for you instead of writing a new one from scratch? WINSOFT offers the best DLL library which made serial communication easy.

Features:

Versions Supported: Delphi 5 – Delphi 10.4/C++

Platforms: Windows;

Installation Steps:

Steps to Download and use the Comport DLL ibrary:

  1. Download Comport DLL and Unzip the file.
  2. Navigate to the Library folder for different Versions. e.g) 32 and 64 bit.
  3. Read the Readme.txt file to know about features and copyright information.
  4. Create a Windows VCL Application and use Comport.pas  from the Examples folder or create your own unit file which loads comport.dll statically or dynamically.
  5. Place the Comport.dll in the Application Exe location.
  6. Compile and check for using the library.

Comport DLL Download and Use On Windows Demo:

Key Serial Communication concepts:

RS232 Serial Communications is a communication of bits that sends and receives data between PC ( Data Terminal Equipment DTE) to remote Device or another PC (Data Communications Equipment DCE).

Request To Send (RTS) Outgoing flow control signal controlled by DTE. Clear To Send (CTS) Incoming flow control signal controlled by DCE. Data Set Ready (DSR) Incoming handshaking signal controlled by DCE. Data Terminal Ready (DTR) Outgoing handshaking signal controlled by DTE.Carrier Detect (CD) Incoming signal from a modem. Ring Indicator (RI) Incoming signal from a modem. More details: Serial Intro.

How to build applications using Comport DLL:

1. Open Rad Studio 10.4.1 and Create a Windows VCL Application. Use the downloaded windows 32/64-bit Comport.dll and load either statically or dynamically.

2. In this sample, the library is loaded statically using the comport.pas in the examples folder from the downloaded comport zip file.

[crayon-672a387c715e6712911403/]

ComPort: Enables to communicate with devices connected to serial port.

3. Retrieve comport devices in PC.

[crayon-672a387c715f3954872257/]

4.Sets the DeviceName,Baudrate,DataBits,StopBits,Parity.

[crayon-672a387c715f5584863631/]

5.Use GetActive/SetActive to Open or Closes the Comport device.

[crayon-672a387c715f7134112021/]

6.Send Data to Comport Device.

[crayon-672a387c715f8593533160/]

7.Receive data and populate in Memo.

[crayon-672a387c715fc793264380/]

8.Use Comport Error,Comport Line Error events to handle errors.

Sample Application Demo:

Conclusion:  These simple steps are sufficient to communicate with comport devices.  WINSOFT made this Library to make developer life easy, save your time and effort.

Check out the full WINSOFT Communication Protocol Suite for Access in Delphi and C++Builder.

Exit mobile version