Direct I/O to parallel port


I want to communicate with a couple of devices directly on serial and
parallel port, and I've encounter some problem using the parallel port.

Using the DLPortIO component:
    -I'm able to print without any problem, but I'm not able to read
from the printer. Does someone have and exemple on how to read with this
    -This component came with functions to retrieve the port from the
they work on Win9x and NT but not on Win2k.
How could I find the available port and there address using the
Win32API, registry...?

Using CreateFile/ReadFile/WritFile...
    -On windows NT CreateFile('\\.\LPT1') work but if a window driver is
install on the port the data goes to the printer
spooler. I've try to use '\\.\NONSPOOLED_LPT1' as suggest by some
programmer in the news group but the create file
failed. Do you know a way to bypass the spooler on WinNT/2k?
    -I didn't found any way to know the port pin state like I coud do

I must find a solution that work on Win9x, NT 4 & Win2k. And I can't
rely on
any setting done by the end user. I've a preference for DlPortIO
because it
give direct access to the pin of the port, but as long I could both
and read from the port I will be happy. Any ideas?

Marcel Eric

P.S: Any comments and corrections of my written English are welcome
(by Email please). I'm still learning.

Marcel Eric Loiselle
ICQ#: 70818921

Sent via