Parallel port programming in Win32
Posted on 1998-04-07
I would like to use the parallel port with Win32 API routines. I know that I can open the port using 'CreateFile' and write the port using the 'WriteFile' routine. However, I assume that this lets you write 8 bits of data via the parallel port 'data' register. I need to be able to use the parallel port 'status' register and the 'control' register. Do I have to use a driver in order to do this or is there a way to access these ports within the Win32 API??
In case I am not clear on what is meant by the parallel port data, status, and control registers, I am talking about the registers that occupy I/O space. Normally, the first parallel port resides at I/O address 0x3BC. This is the 'data' register of the parallel port. The status and control registers follow at I/O address 0x3BD and 0x3BE, consecutively. These are the registers that I would like to access via the Win32 API.