Ports in computer

  • Thread starter Pawe³ Ratajczak
  • 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
 
N

Nicholas Paldino [.NET/C# MVP]

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.
 
I

Ignacio Machin \( .NET/ C# MVP \)

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
 

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

Similar Threads

serial port - again 6
writing ASCII data with the SerialPort component 1
SerialPort, USB ports and Port Names 9
PORTS: COM1 AND LPT1 3
LPT Problems in XP 4
LPT3 should be LPT1 7
LPT3 Should Be LPT1 2
Serial ports 5

Top