Windows Service with com port

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello All,
I need to write VB.NET application as Windows Service with the following
functions: - the Windows Service shall be able to scan and receive data via
serial port - the received data from serial port to be saved in the text
files.
Is anybody can advice the proper way to do it?

Thank you

VK
 
Thanks fot the reply Mohamed.
Now I understand how to read the serial port, but how can I make windows
service constantly check the port. Does .NET have something like MSComm
control with OnComm event?

Thanks
 
Hi,
Does .NET have something like MSComm
control with OnComm event?
<<

The simple class that was referred to in the previous reply does not have
any event notification. You can poll it using a System Timer (easiest is
the System Timer control in the toolbox).

Or, you can use a more complete class, like the Sax Community Edition serial
control that is included in the VB .NET Resource Kit (download from
Microsoft). This one is free, and it does provide OnComm events similar to
those of MSComm.

Dick

--
Richard Grier (Microsoft Visual Basic MVP)

See www.hardandsoftware.net for contact information.

Author of Visual Basic Programmer's Guide to Serial Communications, 4th
Edition ISBN 1-890422-28-2 (391 pages) published July 2004. See
www.mabry.com/vbpgser4 to order.
 
Richard,
I checked out your web site and found NETCommOCX.ocx. Does it have OnComm
event?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top