Low-level programming (i.e. controlling parallel and serial ports) can be tricky in Windows (expecially for someone used to doing it under Linux). Fortunately the cygwin this easy to do in a unix-similar way.

Serial Port Programming

Cygwin is POSIX -compatible enough that programs which access the serial port in a POSIX way will work without modification.

Here is an example: library developed for a specific project, but it should give you an idea of what is needed for basic port operations.

Parallel Port Programming

'Cygwin and PortTalk? DLL

Use Cygwin and the [ porttalk driver] from

I have tested version 2.2 of the porttalk driver on my Thinkpad T43 running WinXP and it works.

'inpout32.dll from Logix4u

Another option is the inpout32.dll library from This comes with a VB example which works out of the box with Visual Basic Express 2005 (free). 'NOTE: the project must be located on a local hard drive, not a network share, or you will get a security exception from the .NET framework.
