0

How can I send output to LPT in C#. I use SerialPort class. I set port name to "LPT1" and I'm getting this error.

The given port name does not start with COM/com or does not resolve to a valid serial port. Parameter name: portName

What to do?

Gabe
  • 84,912
  • 12
  • 139
  • 238
Hooch
  • 28,817
  • 29
  • 102
  • 161

1 Answers1

6

You can't use SerialPort to access a Parallel Port. This will require P/Invoke to inpout32.dll to access. For details, see this tutorial.

Reed Copsey
  • 554,122
  • 78
  • 1,158
  • 1,373