?
Solved

Trapping serial com port event

Posted on 1997-12-12
3
Medium Priority
?
265 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 8

Accepted Solution

by:
ZifNab earned 800 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

Independent Software Vendors: 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

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…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses
Course of the Month15 days, 2 hours left to enroll

771 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