I've never done any LPT port stuff but a quick google points to inpout32.dll. Have look at
this page for delphi examples and
this page for the dll with source by the looks. It says it works in WinXp but I doubt it will work in anything newer. Looks like you have to set bits in the register for port.