If you have tried to write a program that directly addresses the parallel port under Windows NT/2000/XP, you probably have seen the code fail. This is because the Windows NT kernel does not allow usermode programs to have direct access to I/O ports. The solution is to write a device driver or use a 3rd party tool to allow port access.
I have personally found a tool called UserPort to be very simple to use for this purpose. UserPort is a kernel mode driver that can be used in Windows NT/2000/XP to give usermode programs access to I/O ports. UserPort is written by Tomas Franzon, and I have a copy of it here. Read the UserPort.pdf file included in the zip for details on using it. The basics of usage are:
It is that simple! The only drawback is that you are opening a security hole on your system that could be exploited by malicious programs. Therefore, only open the I/O port range that you need access to. Check the resources that your parallel port is using to determine the needed range on your system. UserPort also provides additional security by having the option to only allow applications that open the \\.\UserPort file to have access to the ports. This is a nice option but it requires some extra code. See the UserPort documentation for details.