I'm trying to use a parallel port from a computer as a form of cheap digital output to do various things (control motors, light LEDs, read limit switches, ect).
I want to know how to control the 8 data pins on a parallel port using C++, however there's a catch. Since I'm using a modern computer with a modern OS, this presents a few problems.
First of all, modern windows OS's don't allow direct access to parallel port pins, I must go through a driver. I have been pointed to using Inpout32 to do this, however the sample program compiled and ran properly but my attached hardware didn't respond. Another person has pointed me to using Windows API. I have searched the MSDN and found only mentions of the appropriate function but without some sample code, I'm lost (maybe I'm searching in the wrong places).
The second problem is that my new computer doesn't have any parallel ports. I must use USB to parallel ports instead (cheap and direct from China, $5 each, shipping and taxes all included). The ports are recognized by the computer as IEEE-1284 controllers and the appropriate drivers were automatically installed and the computer reports the device as "working properly". From what i have seen online, there seems to be a wide variety of opinions on the usefulness of these USB to parallel port connectors. One person says it works perfectly fine like any regular parallel port soldered to the motherboard, another says it will work with some hardware hacks, one says it can write but not read, and finally another says it won't work at all because they are not designed to work the same way as "real" parallel ports.
I have already done a great deal of research before coming here (sort of as a last resort I guess, StackOverflow didn't yield any answers even after applying a bounty). Pretty much all the information I found on programming parallel ports is outdated and assumes that you have either a parallel port on your motherboard, a pre-Windows-NT OS, or both.
If anyone has any idea how to do this, would you please share it with me?
Thanks,
-Faken
Note: I'm running Windows 7 x64 OS on a Core i7 860. I'm programming in C++ on Visual Studio 2008 pro. The USB to parallel port connectors are connected via USB 2.0 ports.