I have a button I got out of a random item around the house and I wanna hook it up to my LPT port and check if its pressed or not in C++ and if it is display a message.
Asked
Active
Viewed 551 times
0
-
What button? Can you post a more detailed question in what you are trying to do? Show us that you have done the research, googled around, tried it out... – t0mm13b Jan 30 '10 at 23:38
-
1Tom, this is HAcKLOrD you are talking to. – Jan 30 '10 at 23:44
-
@Neil: am I supposed to know? forgive my ignorance, no disrespect there... – t0mm13b Jan 30 '10 at 23:46
-
The clue is in the name. – Jan 30 '10 at 23:49
2 Answers
1
Your best bet is to use the inpout32.dll which will enable you to read/write from/to the LPT port. The usage of direct addressing of hardware ports is restricted, the dll will enable you to get around the restriction as it executes an internal driver which is already built into the dll and therefore communicating with the driver in an indirect fashion. The dll can be downloaded from here, there is one available for x64bit platform here.
Hope this helps, Best regards, Tom.

t0mm13b
- 34,087
- 8
- 78
- 110
0
If you want to learn about accessing the parallel port, here is a good resource: Lakeview Research

Steve Fallows
- 6,274
- 5
- 47
- 67