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
    ParallelPort0?

    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?

    Thanks,
    Matt
     
    Matt, Jul 7, 2005
    #1
    1. Advertising

  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
    This posting is provided "AS IS" with no warranties, and confers no rights.
    http://www.microsoft.com/whdc/hwdev/driver/kb-drv.mspx
     
    Eliyas Yakub [MSFT], Jul 13, 2005
    #2
    1. Advertising

  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
    #3
  4. Matt

    richard

    Joined:
    Feb 22, 2011
    Messages:
    1
    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?

    Thanks,

    Richard
     
    richard, Feb 22, 2011
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Bill Cohagan

    HP Laserjet 5MP on Parallel Port?

    Bill Cohagan, Dec 10, 2006, in forum: Windows Vista Hardware
    Replies:
    4
    Views:
    571
    Bruce Sanderson
    Dec 19, 2006
  2. Adam
    Replies:
    22
    Views:
    1,496
  3. Rafael Ottmann

    Upper filter driver for parallel port class driver not loading

    Rafael Ottmann, Jun 23, 2005, in forum: Windows Vista Drivers
    Replies:
    1
    Views:
    616
    Eliyas Yakub [MSFT]
    Jun 24, 2005
  4. ksk

    Parallel Port Filter Driver

    ksk, Feb 9, 2006, in forum: Windows Vista Drivers
    Replies:
    2
    Views:
    364
  5. Xepol
    Replies:
    2
    Views:
    261
    Xepol
    Oct 17, 2004
Loading...

Share This Page