Problems using parllel port driver (Parport.sys) + spooler

Discussion in 'Windows Vista Drivers' started by Rafael Ottmann, Jun 9, 2005.

  1. 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,NULL,..))
    ..
    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
     
    Rafael Ottmann, Jun 9, 2005
    #1
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.