If you are reading this you probably want to somehow get information from the world into your computer or you want to get your computer to initiate or control some sort of events in the world outside (possibly both).
Reducing the problem to its simplest, one realizes that there has to be some sort of connection between the computer and the outside world. This connection acts as an interface which moves information to and from the computer. There are a number of ways of doing this and all of them have their various strengths and weaknesses. The parallel port is one such method. The PC parallel port is common, robust and offers (at least) 8 bits each of both input and output. On the down side, the parallel port also has the reputation of being tricky to program and hard to access.
The PortIO95 VxD attempts to address some of the drawbacks associated with parallel port programming on the Windows95 platform. It provides an application programming interface that is simple and which removes a lot of the learning curve.
All the PortIO95 VxD (by itself) will allow you to do is to set certain specific pins on a parallel port high or low, or read the state (again high or low) of other pins. You will notice that (other than a minimal amount in the sample source code comments) there is nothing in this document about designing hardware to attach to the port. That area is pretty specific to what you want to do. Basically PortIO95 does the pins - you do the rest! Look in the Internet Parallel Port Resources section in the FAQ for more sources of information.
And so - on to the API. The API is very simple, it uses the Windows 95 built-in DeviceIoControl() function call to talk to the PortIO95 VxD. This means it is not compiler specific. Any 32 bit compiler should be capable of interacting with the PortIO95 VxD. Look in your compilers Help menu under DeviceIoControl() for more information. The second parameter to the DeviceIoControl() call tells the PortIO95 VxD what to do on your behalf (i.e. read and write to the parallel port). The other parameters to the call are mostly used to provide the bits and bytes to read and write. The whole thing has been reduced to a very simple form - the functions you call depend on what you want to do. Here are the functions divided up in terms of what might want to do.
Programmers calling these functions typically just want to set
individual things on or off (or want to find out if things are
on or off). Typically the whole process is viewed from a "what
is the state of pin x" perspective. Well OK, if that's what
you want then PortIO95 will give you 8 bits of output, 5 bits
of input and another 4 bits that can be set up as either input
or output. You reference them through these calls:
PORTIO_PIN2HIGH PORTIO_PIN2LOW PORTIO_PIN3HIGH PORTIO_PIN3LOW PORTIO_PIN4HIGH PORTIO_PIN4LOW PORTIO_PIN5HIGH PORTIO_PIN5LOW PORTIO_PIN6HIGH PORTIO_PIN6LOW PORTIO_PIN7HIGH PORTIO_PIN7LOW PORTIO_PIN8HIGH PORTIO_PIN8LOW PORTIO_PIN9HIGH PORTIO_PIN9LOW PORTIO_PIN1HIGH PORTIO_PIN1LOW PORTIO_PIN14HIGH PORTIO_PIN14LOW PORTIO_PIN16HIGH PORTIO_PIN16LOW PORTIO_PIN17HIGH PORTIO_PIN17LOW PORTIO_READPIN1 PORTIO_READPIN10 PORTIO_READPIN11 PORTIO_READPIN12 PORTIO_READPIN13 PORTIO_READPIN14 PORTIO_READPIN15 PORTIO_READPIN16 PORTIO_READPIN17
Programmers calling these functions typically view the input/output to the computer in terms of groups of bits (i.e. bytes and nibbles). PortIO95 offers the ability to manipulate information in this manner. PortIO95 can give you a byte of output and a byte of input or a byte and a half of output and four bits of input. To use these functions, you do not have to be super knowledgeable in terms of the parallel port as long as you accept that certain pins have to be grouped together for hardware reasons (however illogical it may seem) and represent certain specific bits in the incoming and outgoing data. If you are prepared to accept this, then welcome to:
PORTIO_SEND_BYTE_TO_PINS2_TO_9 PORTIO_SEND_BYTE_TO_PINS1_14_16_17 PORTIO_READPINS1_14_16_17 PORTIO_READPINS15_13_12_11 PORTIO_READ_CS_BYTE
Programmers calling these functions know (and care) about things like the data register, the status register, hardware inverted bits and the nasty little capacitor to ground off of the control register bit 0 that limits the bandwidth there. For these people PortIO95 provides a large number of functions. Many are just synonyms for the ones listed above but are named from the register perspective. They are a bit too numerous to list (see the Control Code Reference) but here's a sampler:
PORTIO_READCREG PORTIO_WRITECREGRAW PORTIO_WRITEDREG PORTIO_READSREGRAW PORTIO_SETD0 PORTIO_UNSETD0 PORTIO_READC0