Ports in computer

  • Thread starter Thread starter Pawe³ Ratajczak
  • Start date Start date
P

Pawe³ Ratajczak

Hello Group,
I've one question about commport (COM1,COM, LPT1).
How read (Tx Rx) from serial potr (COM1) or parallel port (LPT) and write this
to screen.

PawelR
 
Pawel,

If you want to connect to a serial port, then your best bet would be to
use the CreateFile API function through the P/Invoke layer to open up the
com port. Once you have the handle to that, you can pass it to the
FileStream class to read/write from/to the com port.

Hope this helps.
 
Hi Pawel,

In addition to Nicholas comments I would recommend you take a look at this
article from the MSDN magazine
http://msdn.microsoft.com/msdnmag/issues/02/10/netserialcomm/

Hope this help,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

Nicholas Paldino said:
Pawel,

If you want to connect to a serial port, then your best bet would be to
use the CreateFile API function through the P/Invoke layer to open up the
com port. Once you have the handle to that, you can pass it to the
FileStream class to read/write from/to the com port.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Pawe³ Ratajczak said:
Hello Group,
I've one question about commport (COM1,COM, LPT1).
How read (Tx Rx) from serial potr (COM1) or parallel port (LPT) and
write
this
to screen.

PawelR
 
Back
Top