Tech Support > Microsoft Windows > Drivers > Problems using parllel port driver (Parport.sys) + spooler
Problems using parllel port driver (Parport.sys) + spooler
Posted by Rafael Ottmann on June 9th, 2005


Hello there,

Hope you guys can help me out on this one....
I´ve created a user mode driver ( dll ) to command a printer device
connected to the parallel port; it is supposed to work in all WinOS Version,
but i am developing and testing it under XP.
Everything goes fine when there´s NO spooler printer assigned to the
parallel port. In this case I am able to obtain successfully a port handle
(CreateFile("LPT1"..), write to the file (WriteFile...) and request some
status information ( DeviceIoControl(..,IOCTL_PAR_QUERY_INFORMATION,NUL L,..))
..
But whenever I set an installed system printer to use this parallel port,
any further DeviceIoControl fails (LastError= 1="Incorrect function"),
furthermore, any data I write to the port, through the WriteFile API, is
spooled by the system and is only actually "flushed" to the printer when the
port handle is closed (CloseFile).

I do not want the data to be spooled. I dont wish to stop the spooler
service.
Is there a way to overcome this situation from the user mode side?

thank you,
Rafael Ottmann




Similar Posts