- Toaster Filter driver
- Posted by SAM on February 6th, 2007
Hello guys,
I have a question. I have modified some of the KMDF toaster sample
filter driver from WDK6000 and tried to install this to one of usb
function driver to see if I can get the right IRPs from it. But
unfortunately I couldn't make it work when I install it with the INF
file coming with the sample code. How can I modify this INF file to
make it sit on top of one of the USB devices? or is there a simple way
to do it manually as use to be with the WDM??
I used to make a registry key "UpperFilters" in the designated device
and disable/enable the device manually, then it was working fine. How
can I do this with the KMDF? Should I always use the INF to install
it? even to the filter driver?
Thank you.
- Posted by Eliyas Yakub [MSFT] on February 7th, 2007
Installing a filter driver for an existing device with INF is little tricky.
The INF file has to include sections from the INF of the actual function
driver using Needs and Includes directive. The filter driver inf provided
with KMDF sample doesn't demonstrate that. It installs the function and
filter together as one package.
I suggest you look at src\general\toaster\inf\i386\filter.inf or INFs for
keyboard and mouse filter sample under src\input.
With Vista, you wouldn't be able to modify the Enum registry manually. So
using INF is a good choice for the long run.
-Eliyas
- Posted by SAM on February 10th, 2007
Thank you Eliyas,
I have looked the examples that you mentioned and correct my INF. Somehow I
can register my driver in the system no to the device and it is able to work
with my driver after I register it to the registry manually.
Then this question comes in my mind. How can I do this manually as I used to
do in WDM. In WDM we just make a registry key in the "Service" and register
the driver in the registry as an upper or lower then en/disable the device
then everything is OK. How can I do this in KMDF?
Thank you again.
"Eliyas Yakub [MSFT]" <eliyasy@online.microsoft.com> wrote in message
news:OE8zN%23vSHHA.3980@TK2MSFTNGP02.phx.gbl...
- Posted by Eliyas Yakub [MSFT] on February 10th, 2007
You can do the same thing with KMDF driver if the framework runtime binaries
are already on the system. Since they are not going be there on any
downlevel systems (win2k thru Server2003), you have to use the
wdfcoinstaller to install the binaries. That's why I suggested you to use
INF file.
If you are using an installer application to instantiate the service and add
registery entries, then you can install the KMDF binaries programmatically
without the INF. Take a look at the exe file of src\kmdf\nonpnp sample in
the WDK. It shows how to load the wdfcoinstaller dll and invoke the entry
points to install/remove KMDF bits.
-Eliyas
- Posted by David J. Craig on February 11th, 2007
It works very well, too. I found it interesting and useful, but I just
lucked out finding it.
"Eliyas Yakub [MSFT]" <eliyasy@online.discussion.microsoft.com> wrote in
message news:Oqw4mbXTHHA.4872@TK2MSFTNGP03.phx.gbl...