Solved

Trapping serial com port event

Posted on 1997-12-12
3
253 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
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…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

749 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