Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Vista Drivers > Parallel port filter - what is a MicrosoftRawPort?

Thread Tools Display Modes

Parallel port filter - what is a MicrosoftRawPort?

Posts: n/a

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?


Reply With Quote
Eliyas Yakub [MSFT]
Posts: n/a

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.

This posting is provided "AS IS" with no warranties, and confers no rights.

Reply With Quote
Posts: n/a

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.

Reply With Quote
Junior Member
Join Date: Feb 2011
Posts: 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?


Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
HP Laserjet 5MP on Parallel Port? Bill Cohagan Windows Vista Hardware 4 12-19-2006 08:06 AM
Parallel Port Filter Driver ksk Windows Vista Drivers 2 02-09-2006 10:50 PM
Upper filter driver for parallel port class driver not loading Rafael Ottmann Windows Vista Drivers 1 06-24-2005 06:26 AM
VPC Serial Port Access -was it changed like the parallel port in SP1? Xepol Virtual PC 2 10-17-2004 02:40 AM
I2C through PC parallel port, serial port and/or USB port - please help Adam Windows Vista Drivers 22 06-29-2004 04:48 PM