Solved

Trapping serial com port event

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Machine not responding during CopyFile() 3 98
oracle global variables 4 68
select query - oracle 16 100
Convert a string into a TDateTime 5 60
The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

816 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

8 Experts available now in Live!

Get 1:1 Help Now