Parallel port filter - what is a MicrosoftRawPort?

Discussion in 'Windows Vista Drivers' started by Matt, Jul 7, 2005.

  1. Matt

    Matt Guest

    I am trying to capture the data that flows across a parallel port. I have
    used the DDK's Toaster Upper Filter sample to install an upper class filter
    for the ports class. However, my filter is not getting any IRP's when
    something is printed to LPT1. It does get PnP IRP's if I disable the port
    from Device Manager so I know that my filter is installed at least somewhere.
    I also get IRP's when something is sent to a serial port since my filter is
    installed as a class filter. Here are my questions:

    1) What is the difference between Parallel0 and ParallelPort0? I get the
    feeling that I am installed as an upper filter of ParallelPort0 and not of
    Parallel0 even though they both use the parport.sys service.

    2) What is a MicrosoftRawPort? Parallel0 is considered a MicrosoftRawPort
    device which does not use the ACPI device object. It is also the device that
    appears to be getting all of the IRP's.

    3) Is the MicrosoftRawPort class found on all computers or just some?

    4) How would I attach an upper filter to Parallel0 instead of just

    5) Why does the parallel port behave differently from the serial port? My
    filter works great for seriall port devices. I would expect the same behavior
    for parallel ports.

    6) Is there an easier way to do this? Can what I want to do be accomplished
    from user mode code without writing a driver?

    Matt, Jul 7, 2005
    1. Advertisements

  2. Parallel.sys is a bus driver. It not only controls the parallel port but
    also enumerates and performs I/O to the devices that are connected to the
    port. So \Device\ParallelPortx is name of the FDO and \Device\Parallelx is
    name of the deviceobject (PDOs) that parallel.sys creates to represent the
    devices attached to the parallel port. These PDOs are enumerated as raw pdos
    (i.e application can open the device and talk to it directly) so there is no
    function driver.

    In the DDK documenation read "Parallel Device Interfaces, Internal Names,
    and Symbolic Links" section. It describes what these names mean.

    In the serial stack, serial.sys is the function driver (FDO) for the com
    port. The device connected to the com ports are enumerated by serenum.sys
    attached to serial.sys as an upper device filter.

    To filter the PDO , you have to write a bus filter. Bus filters are very
    hard to write and there is abosultely no documentation about it. If you
    really need to write a bus filter then call MS DDK tech support and they
    might be able to provide toaster bus filter sample.

    The entire source code of parallel driver is in the DDK. So you can read the
    code and figure out answers to lot of other questions your have.
    Eliyas Yakub [MSFT], Jul 13, 2005
    1. Advertisements

  3. Matt

    Matt Guest

    That was what I was afraid of. Unfortunately, I can't change the interface
    type to something like USB because this application is for existing devices
    out in the field.

    Thanks for the help. I'll read the resources mentioned.
    Matt, Jul 13, 2005
  4. Matt


    Feb 22, 2011
    Likes Received:
    Hi Matt / Eliyas

    Did you have any luck with this. Is it possible to filter the data being read to a parallel port from the FDO without having to write a bus filter to sit at the PDO?


    richard, Feb 22, 2011
    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.