Solved

Handling COM port under NT service

Posted on 1998-03-23
2
159 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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

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…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

708 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

20 Experts available now in Live!

Get 1:1 Help Now