One question I've fielded quite a bit from Visual Basic users is how can you access the parallel port in Windows using REALbasic?
Well, it used to be (back in the olden days), you could access the parallel port via regular system API calls from your application. The OS would happily let you input data from the port and output data to the port in the form of 16-bit integers. However, when Microsoft wrote the NT kernel, they decided to restrict access to many of the more low-level APIs such as _inp and _outp, and they left many users stranded.
Then along came the InpOut32.dll project. This free library has quickly become the standard way to access the parallel port in any language on any version of Windows. It's API is 100% compatible with the Parallel Port Complete bible, and includes access to the source code for the project.
Once you've downloaded the binaries, you're almost ready to access the parallel port like you could in the old days. The only thing left in your way is to declare into the DLL to get access to the APIs. Thankfully, there's only two very simple APIs you need to access: Inp32 and Out32.
Soft Declare Function Inp32 Lib "InpOut32" ( portAddress as Short ) as Short
Soft Declare Sub Out32 Lib "InpOut32" ( portAddress as Short, data as Short )
And that's all there is to it! You can download this source code, nicely wrapped up for you in a module, here.
