operate parallel port

  • Thread starter Thread starter Charles Wang
  • Start date Start date
C

Charles Wang

I can not create handle of parallel port while using createfile("LPT1:").
The handle always return -1.

Does CreateFile could open parallel port? I notice PB's help mentions that
CreateFile could creates, opens, or truncates a file, COM port, device,
service, or console. My puzzle is that the device include parallel port?

I can operate COM1 or COM2 in the same way. The LPT1, COM1 and COM2 are all
contained in my device's registry. And I think my hardware has no problem.

Thanks for your help!
Charles Wang
 
If there is a parallel port device on the board and if the driver is
installed correctly, either the port is non-functional and the driver is not
loading as a result, or some other process has the port open. Follow the
instructions in the C help for CreateFile to get the error code associated
with the failure; it will tell you what the problem is.

Paul T.
 
Back
Top