Keyboard filter.

I have to write a keyboard filter driver. I understand the WDM concepts and
I examined Windows 2003 DDK documentation and kbfiltr sample. The question
is how do I register driver (INF file) to make it load automatically and
attach to needed device (kbdclass PDO?).

–htfv

See the ClasFilt example INF in the Setup directory.

Pete

Peter Scott
xxxxx@KernelDrivers.com
www.KernelDrivers.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Alexey Logachyov
Sent: Wednesday, April 28, 2004 1:09 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] Keyboard filter.

I have to write a keyboard filter driver. I understand the WDM concepts and
I examined Windows 2003 DDK documentation and kbfiltr sample. The question
is how do I register driver (INF file) to make it load automatically and
attach to needed device (kbdclass PDO?).

–htfv


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@kerneldrivers.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

Thanks for the input.

I was confused if it was OK to just add my driver name to ‘UpperFilters’
registry value in class driver section, because I read somewhere (in
comments to one of DDK samples I believe) that one should not rely on order
in which drivers are specified in ‘UpperFilters’ value.

I worked only on file system drivers before. Now, I’m moving to WDM drivers
and this INF stuff just drives me crazy.

–htfv

“Peter Scott” wrote in message
news:xxxxx@ntdev…
>
> See the ClasFilt example INF in the Setup directory.
>
> Pete
>
> Peter Scott
> xxxxx@KernelDrivers.com
> www.KernelDrivers.com
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Alexey Logachyov
> Sent: Wednesday, April 28, 2004 1:09 PM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] Keyboard filter.
>
> I have to write a keyboard filter driver. I understand the WDM concepts
> and
> I examined Windows 2003 DDK documentation and kbfiltr sample. The question
> is how do I register driver (INF file) to make it load automatically and
> attach to needed device (kbdclass PDO?).
>
> --htfv
>
>
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@kerneldrivers.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
>

I think I’ve got it. The kbfiltr sample seems not to depend on load order
because it inserts itself into the service callback chain and does not
filter IRPs as a classical filter driver.

–htfv

“Alexey Logachyov” wrote in message news:xxxxx@ntdev…
> Thanks for the input.
>
> I was confused if it was OK to just add my driver name to ‘UpperFilters’
> registry value in class driver section, because I read somewhere (in
> comments to one of DDK samples I believe) that one should not rely on
> order in which drivers are specified in ‘UpperFilters’ value.
>
> I worked only on file system drivers before. Now, I’m moving to WDM
> drivers and this INF stuff just drives me crazy.
>
> --htfv
>
>
>
> “Peter Scott” wrote in message
> news:xxxxx@ntdev…
>>
>> See the ClasFilt example INF in the Setup directory.
>>
>> Pete
>>
>> Peter Scott
>> xxxxx@KernelDrivers.com
>> www.KernelDrivers.com
>>
>> -----Original Message-----
>> From: xxxxx@lists.osr.com
>> [mailto:xxxxx@lists.osr.com] On Behalf Of Alexey Logachyov
>> Sent: Wednesday, April 28, 2004 1:09 PM
>> To: Windows System Software Devs Interest List
>> Subject: [ntdev] Keyboard filter.
>>
>> I have to write a keyboard filter driver. I understand the WDM concepts
>> and
>> I examined Windows 2003 DDK documentation and kbfiltr sample. The
>> question
>> is how do I register driver (INF file) to make it load automatically and
>> attach to needed device (kbdclass PDO?).
>>
>> --htfv
>>
>>
>>
>>
>>
>> —
>> Questions? First check the Kernel Driver FAQ at
>> http://www.osronline.com/article.cfm?id=256
>>
>> You are currently subscribed to ntdev as: xxxxx@kerneldrivers.com
>> To unsubscribe send a blank email to xxxxx@lists.osr.com
>>
>>
>>
>
>
>

Right, meaning that if there are several ‘upper filters’ for a given device,
then one should not rely on the order of the UpperFilter value to determine
the order or placement of their filter in the stack.

Pete

Peter Scott
xxxxx@KernelDrivers.com
www.KernelDrivers.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Alexey Logachyov
Sent: Wednesday, April 28, 2004 1:46 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] Keyboard filter.

Thanks for the input.

I was confused if it was OK to just add my driver name to ‘UpperFilters’
registry value in class driver section, because I read somewhere (in
comments to one of DDK samples I believe) that one should not rely on order
in which drivers are specified in ‘UpperFilters’ value.

I worked only on file system drivers before. Now, I’m moving to WDM drivers
and this INF stuff just drives me crazy.

–htfv

“Peter Scott” wrote in message
news:xxxxx@ntdev…
>
> See the ClasFilt example INF in the Setup directory.
>
> Pete
>
> Peter Scott
> xxxxx@KernelDrivers.com
> www.KernelDrivers.com
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Alexey Logachyov
> Sent: Wednesday, April 28, 2004 1:09 PM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] Keyboard filter.
>
> I have to write a keyboard filter driver. I understand the WDM concepts
> and
> I examined Windows 2003 DDK documentation and kbfiltr sample. The question
> is how do I register driver (INF file) to make it load automatically and
> attach to needed device (kbdclass PDO?).
>
> --htfv
>
>
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@kerneldrivers.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
>


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@kerneldrivers.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

We are talking about 2 things here. The order of drivers being loaded
is defined by the UpperFilters value. At least, this is how currently
shipping OS’s handle it and breaking that contract would break too many
assumptions.

So if you add yourself to the upper filters to be before kbdclass you
will be loaded on top of the keyboard port before kbdclass. Also, you
will be loaded for *every* keyboard on the machine. Furthermore, you
will need a reboot to be inserted into every stack since all of the
stacks are already built up.

Kbdfiltr in the ddk gets loaded into the stack b/c it is a device level
upper filter. If you want to filter all keyboards, this is not how you
want to insert yourself. If you want to filter only one keyboard this
is the place to be. See the .inf in the example on how to update the
device’s UpperFilters value.

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Alexey Logachyov
Sent: Wednesday, April 28, 2004 1:03 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] Keyboard filter.

I think I’ve got it. The kbfiltr sample seems not to depend on load
order
because it inserts itself into the service callback chain and does not
filter IRPs as a classical filter driver.

–htfv

“Alexey Logachyov” wrote in message
news:xxxxx@ntdev…
> Thanks for the input.
>
> I was confused if it was OK to just add my driver name to
‘UpperFilters’
> registry value in class driver section, because I read somewhere (in
> comments to one of DDK samples I believe) that one should not rely on
> order in which drivers are specified in ‘UpperFilters’ value.
>
> I worked only on file system drivers before. Now, I’m moving to WDM
> drivers and this INF stuff just drives me crazy.
>
> --htfv
>
>
>
> “Peter Scott” wrote in message
> news:xxxxx@ntdev…
>>
>> See the ClasFilt example INF in the Setup directory.
>>
>> Pete
>>
>> Peter Scott
>> xxxxx@KernelDrivers.com
>> www.KernelDrivers.com
>>
>> -----Original Message-----
>> From: xxxxx@lists.osr.com
>> [mailto:xxxxx@lists.osr.com] On Behalf Of Alexey
Logachyov
>> Sent: Wednesday, April 28, 2004 1:09 PM
>> To: Windows System Software Devs Interest List
>> Subject: [ntdev] Keyboard filter.
>>
>> I have to write a keyboard filter driver. I understand the WDM
concepts
>> and
>> I examined Windows 2003 DDK documentation and kbfiltr sample. The
>> question
>> is how do I register driver (INF file) to make it load automatically
and
>> attach to needed device (kbdclass PDO?).
>>
>> --htfv
>>
>>
>>
>>
>>
>> —
>> Questions? First check the Kernel Driver FAQ at
>> http://www.osronline.com/article.cfm?id=256
>>
>> You are currently subscribed to ntdev as: xxxxx@kerneldrivers.com
>> To unsubscribe send a blank email to xxxxx@lists.osr.com
>>
>>
>>
>
>
>


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com