Solved

Trapping serial com port event

Posted on 1997-12-12
3
233 Views
Last Modified: 2010-04-04
I am currently accessing the PC's serial com port in Delphi 2 using Createfile, readfile and wrirefile method. Now, I have created a buffer and whenever I read the port, I transfer the contents to the buffer. How do I trap the event whenever the serial port receives data? I am trying to avoid polling the port for data (eg using threads or timers)

By the way, I have ported my code to Delphi 3 and it seems to work fine. However, I couldn't find the createfile, writefile, etc functions that I am using. Does Delphi 3 have a different method of accessing the port, and maybe this method can help in the trapping of the event in question?

Cheers
Keith
0
Comment
Question by:keithcsl
  • 2
3 Comments
 
LVL 8

Accepted Solution

by:
ZifNab earned 200 total points
ID: 1353461
Well, this isn't a answer to the point. But I use a component for serial port comunications which is very good. You've got everything there what you need. (Com1..16, events, ...).
Look at it! Why inventing the wheel if it already exists?

URL   : http://www.mdlive.com/d3k/

Besides it's freeware, so it wouldn't mind just to have a look at it.

Have fun,
c.u. ZifNab;
0
 
LVL 1

Author Comment

by:keithcsl
ID: 1353462
ZifNab

Well, I guess a person who delivers the source of the answer deserves the credit. But it would also be very nice to acknowledge the other party, so here they are:

 - D3K, The Artisan Of Ware.
 - M. Cocco.

By the way, the source file is cd320108.zip

Thanks to all of you
Keith
0
 
LVL 8

Expert Comment

by:ZifNab
ID: 1353463
keithcsl,

Correct about giving credits! Offcourse, in my program I give these authors a lot of credit. I hope that everybody does this when they use components of other parties.
I didn't gave the name here, because I don't want that this site will become a commercial site...

Glad we could help you.
Zif.
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now