|Jotsite Water Cooler Area|
Communicating with a Parallel Port
An off-the-cuff question asked by a fellow developer is how to communicate with a PC parallel port. A quick search on the internet reveals the following information and sample C++ code:
This is some detailed information on Parallel Ports: http://www.beyondlogic.org/spp/parallel.htm
These are C/C++ code fragments to deal with it:
Although there may be many other examples, a quick simple working one is all that is needed to build from. The requirement also really depend upon the device which you are trying to talk to. If the device happen to be TWAIN compliant, it is usually easier to talk to the device through a TWAIN driver. These are pretty common now and chances are very good that the developers have already worked out most (if not all) the kinks in dealing with a TWAIN device. TWAIN devices tend to be Scanners, low-resolution image capture devices, or other parallel/usb based devices.
But if you need to get at the parallel port bits, the above example should be sufficient.