How to recieve or sent data through serial or parallel port?

  • Thread starter Thread starter K.K.
  • Start date Start date
K

K.K.

I am writing program that will recieve or sent data to
selected port (users can select which port they want to
recieve or sent) but I don't know how or whick object I
can use.
 
Hi,

These are two different issues. For serial communications, you use the
Windows serial communications APIs. This may be done by using a .NET class
that wraps the functionality of these APIs using Platform Invoke. I have
example code in my book (see below), and there are several examples
available online, both for VB and C# (example, www.msdn.microsoft.com and
search for 101 VB.NET examples). Or, you can use an ActiveX control, like
the free NETComm.ocx that you can download from my homepage. Lastly, there
is at least one commercial comms product for .NET (go to www.saxsoft.net for
this).

For parallel IO, the only way is to use a kernel-mode device driver. There
are no methods built into Windows for this. To make is easy, you can
download IOocx.ocx from my homepage.

Dick

--
Richard Grier (Microsoft Visual Basic MVP)

See www.hardandsoftware.net for contact information.

Author of Visual Basic Programmer's Guide to Serial Communications, 3rd
Edition ISBN 1-890422-27-4 (391 pages) published February 2002.
 
Back
Top