Windows Monitoring a parallel or LPT port

2.2k views Asked by At

Does anyone know a good library to allow us to programmatically monitor a parallel port (or LPT port) in windows. There are lots of good ones for Serial ports but I have had no luck yet for parallel ports. C# would be preferred but we're happy to do the Interop work if it's c / c++.

Thanks

2

There are 2 answers

1
Hans Passant On BEST ANSWER

You need a driver that gives access to the parallel port. The inpout32.dll solution is nearly universally used. It also lets you pinvoke helper routines to execute the INP and OUT cpu instructions. Everything you'd ever want to know about parallel ports, including coding samples for inpout32 is assembled at Jan Axelson's home page.

1
Anuraj On

Are you looking for something like this? How to find available parallel ports and their I/O addresses using Delphi and WMI its in Delphi, but I think you can find WMI in C# too.