Solved

Handling COM port under NT service

Posted on 1998-03-23
2
161 Views
Last Modified: 2010-04-06
Hi All,

I've got a big problem. I wrote a service under WINNT which      
asks the SERIAL Port, and put the characters into a file.
The problem is, I don't know when is data in the input buffer. My program contains a loop which never ends and the CP usage is nearly 100%. As far as I know, the sender sends a signal which indicates that the data is valid. How can I mask it?
Is there any solution?

Thanks in advance

ANdrew
0
Comment
Question by:bandi081497
2 Comments
 
LVL 3

Expert Comment

by:altena
ID: 1360726
Remove the loop, check out the "WaitCommEvent" function
in the Win32 Help/documentation.

You can have the OS "wake your progam" whenever something
interesting happens at the COMM port.
0
 
LVL 8

Accepted Solution

by:
ZifNab earned 100 total points
ID: 1360727
Hi bandi,

Well, maybe this helps, it is a freeware component! So if you want to write it on your own, be my guest, but then I can't help you. I use this component already a long time and it works perfectly!!! Really I don't think it's nessecarry to put all your time in writing such a component on your own. It's even with source so..... I let it up to you to decide if you want to use this component are not. If not just reject my answer... but really, have first a glimp at it before you do!!!

author : M. Cocco.
E-mail: d3k@mdnet.it
URL   : http://www.mdlive.com/d3k/
--------------------------------------

Regards, Zif.
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Delphi XE10, DigitalPersona Fingerprint reader and MySQL 6 271
Delphi - replicating a form 8 76
select query - oracle 16 100
How to load 2 images in same column in Delphi 2 47
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

803 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