Tech Support > Microsoft Windows > Drivers > Re: Filter Driver
Re: Filter Driver
Posted by Bill McKenzie on July 24th, 2003


Wait a second. Where exactly in the data path do you actually want to
capture data, and what driver is currently controlling this device? Is this
a network device?

--
Bill McKenzie
Compuware Corporation
Watch your IRPs/IRBs/URBs/SRBs/NDIS pkts with our free WDMSniffer tool:
http://frontline.compuware.com/nashu...es/utility.htm


"Paul West" <pwest@siu.edu> wrote in message
news:00e601c3515e$9c176360$a601280a@phx.gbl...


Posted by Paul West on July 24th, 2003


No, it is not a network device. Actually, it is a USB
Human Interface Device. A USB External Ten-key Pad to be
exact. The problem is we are hooking this to a laptop,
when the Numlock key is pressed, the laptop's numlock
state is set and therefore some of the characters on the
laptop's keyboard change to numbers. I thought it might
be best to just derive from the USB filter driver that
came with the Win DDK, grab the keystokes from the device,
and modify them before sending them on. After thinking
about it, I wonder if it would be better to write a filter
driver to attach to the keyboard on the laptop that will
pass only characters no matter how the numlock state is
set. What do you think?

Posted by Doron Holan [MS] on July 24th, 2003


unless you sending non numlock scancodes, err usages, for all the keys, it
doesn't matter what you send. when you press numlock 8, usage is the same
whether numlock is on or off. The OS maintains state based on the numlock
state and interprets the scancode appropriately (the same applies for caps
lock or holding down shift).

I am assuming you dont own the hardware and can change it. I would install
a keyboard device filter (see kbfiltr in the DDK). kbfiltr operates on scan
codes, not hid usages. YOu have much less data to parse. what you
basically would do is filter away the numlock keypresses in the filter and
never report them to the OS. When you get a numlock change, you send an
IOCLT_KEYBOARD_SET_INDICATORS (if that is not the name, it is pretty close)
down the stack so that the LED on the keypad still functions (ie lights up)
as the user would expect. Since you are maintaining an independent key
state anyways, you filter on the scancode appropriate for a numpad and
change them into scancodes that are non numpad (ie turn numpad 8 code into a
normal 8, numpad . into . etc etc)

d

--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Paul West" <pwest@siu.edu> wrote in message
news:109401c351fd$77548770$a001280a@phx.gbl...


Posted by Bruce Tompkins on August 21st, 2003


Hi Paul and Doron.

I had a similar problem with a barcode scanner that
appears as an HID Keyboard Device in Windows Device
Manager. I developed (with the assistance of a Microsoft
DDK tehnician) a keyboard device filter driver that
allows me to read from the barcode scanner. Works great
except for one problem: access is denied if I run my
application from a Windows XP non-admin user account.
Doron, if you have any insight into how I can solve this
problem, could you please let me know?

Also, Paul, if you are writing a keyboard filter driver
and need some assistance, I can lend you my (hopefully
valuable) experience!

Thanks, ...bruce


Similar Posts