RE: Re: Installl Keyboard filter driver

Hello,
I have problem in understanding :
How can be installed? i8042prt upper filter (kbdfiltr) driver
programmatically.
I did not success to install DDK example kbfilrr programmatically, using
kbfiltr.inf
The final function (in install program) UpdateDriverForPlugAndPlayDevces
return TRUE.
The install program does not replace Registry 0000
"DeviceDesc PC/AT Enhanced PS/2 Keyboard (101/102-Key)"
under {4D36E96B-E325-11CE-BFC1-08002BE10318}
and create new Registry 0001 " "DeviceDesc DDK Example ...",
"MatchingDeiviceID
*PNP0BAAD

In this case after reboot kbfilr driver return error status (0xC000000E) to
IRP
IRP_MN_START_DEVICE.
Any advice would be greatly appreciated.
mark

-----Original Message-----
From: Doron Holan [mailto:xxxxx@windows.microsoft.com]
Sent: Monday, November 17, 2003 7:24 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] Re: Keyboard filter driver and SMS

To install on the ps2 keyboard, you must have an INF that has all the
possible ps2 keyboard hw ids (pnp03xx, where xx are some hex values). See
keyboard.inf for all of the relevant hw IDs for ps2 keyboards.

SMS has been fixed for a long time now, the current version should work just
fine w/the ps2 stack.

D

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


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Mark Shnaider
Sent: Monday, November 17, 2003 2:19 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Re: Keyboard filter driver and SMS

Thank very much Doron and Ray for your explanation.
I understood that sending? IOCTL_INTERNAL_I8042_HOOK_KEYOBARD from
kbclass filter is not correct way.
But I have additional questions:
1.
? How can be installed? i8042prt upper filter driver programatically
(example? kbdfilr? from DDK), using install program.?
? I try to use? UpdateDriverForPlugAndPlayDevices but it? does not work
(? UpdateDriverForPlugAndPlayDevices dos not work by Ray notes? too).
? Any advice or suggestions and? would be greatly appreciated.
2.
?? Is Microsoft planning to release SMS version, supported? IOCLs for
hook keyboard interrupt ?
regards
Mark

-----Original Message-----
From: Doron Holan [mailto:xxxxx@windows.microsoft.com]
Sent: Thursday, November 13, 2003 7:59 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] Re: Keyboard filter driver and SMS

You should *not* be sending IOCTL_INTERNAL_I8042_HOOK_KEYOBARD from your
driver.? Only i8042prt should send this IOCTL.? I wrote and owned this code,
so please trust me.? Just because it kinda works today, doesn't mean it will
work tomorrow, pleas stick to the intended design.? Everybody in the stacks
assume that this is sent once and only once, if you look at the i8042prt
code, there is no locking around the storing of the results of this IOCTL,
which could lead to some very nasty crashes if you keep resending this
request on your own.? If you need to dynamically change the hook routine,
change it internally to your own driver (ie keep the hook routine constant
through i8042prt's invocation of this irp and then from your constant
routine variably call the appropriate routine that you would have been
changing with the IOCTL call).
This IOCTL is specific to the ps2 stack anyways.? Sending it down arbitrary
stacks makes no sense whatsoever.?
As for kbstuff5.sys, it is a version of the SMS virtual keyboard driver.? It
only existed for one short termed release.? It was written before these
IOCTLs were finalized and appears not to play very fairly with any filter
driver, not just yours.? The current version of SMS doesn't ship this driver
AFAIK.
D
This posting is provided "AS IS" with no warranties, and confers no rights


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Mark Shnaider
Sent: Thursday, November 13, 2003 1:57 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Re: Keyboard filter driver and SMS
Hello,
Thank you very much for your answers.

  1. I think that? IOCTL_INTERNAL_I8042_HOOK_KEYOBARD IOCTL
    ?? can be sent later and change chain of interrupt hooks .
    ?? When AddDevice is called my driver build
    IOCTL_INTERNAL_I8042_HOOK_KEYOBARD IOCTL
    ?? and sent to device stack.
    ?? It works OK.
    2 The Kbdstuff5.sys is upper? keyboard? filter driver installed? by SMS.
    ??? See registry ??????
    "System\CurrentControlSet\Control\Class\{4D36E96B-E325-11CE-BFC1-08002BE
    10318}\UpperFilters".
    ??? This? driver? does nor work? correct (to my opinion) with keyboard
    interrupt hooks.
    ???
  2. I will try to? find solution for this problem.
    ??? May be you know where can I get last SMS version. ?
    ??? May be this problem is solved in last SMS version ?
    regards
    Mark
    ??
    ???????
    -----Original Message-----
    From: Ray Trent [mailto:xxxxx@synaptics.com.spamblock]
    Sent: Thursday, November 13, 2003 3:49 AM
    To: Windows System Software Devs Interest List
    Subject: [ntdev] Re: Keyboard filter driver and SMS
    Mark Shnaider wrote:

Why only? the i8042 driver can send the
IOCTL_INTERNAL_I8042_HOOK_KEYOBARD IOCTL?
Well, it will send it once during initialization to the top of the
device stack for the PS/2 keyboard.
If you later send it, then filter drivers that might be installed might
become fatally confused, because they are not expecting a second one.
version
The my driver send IOCTL_INTERNAL_I8042_HOOK_KEYOBARD IOCTL
and kbdclass driver pass this IOCTL to the i8042 driver.? The driver
has IsrHook routine? for supporting exchange with? Smart card keyboard
reader.(special mode)
This driver performs also? monitoring keystrokes from?
keyboard.(transparent mode)
This is the *classic* example of a driver where a modified version of
kbfilter is intended to be installed as an i8042 upper filter. My driver
happens to be (mostly) a mouse driver rather than a keyboard driver, but
the 2 are completely analogous in terms of interface.
The i8042 upper filter will not solve this problem because
as I remember? kbfiltr.sys (i8042 upper filter driver? from DDK example,
used IOCTL_INTERNAL_I8042_HOOK_KEYOBARD IOCT)
does not works properly too if? SMS service was installed.!!!!
Well, you have to be careful how you install your filter. It should only
be installed on the devnode representing the PS/2 keyboard. If you do
that, then the SMS service will be irrelevant. However, this can be
somewhat tricky to do programatically in some cases.
UpdateDriverForPlugAndPlayDevices does a pretty good job at this, though.
My mouse driver also used to be installed as a keyboard filter driver
(don't ask :-). So I know that this works, as long as you don't install
on the SMS service's "fake" keyboard devnode.
If you do attach to the SMS keyboard devnode as an upper filter, there
is at least one bug in SMS (as far as I was able to determine) that will
cause bluescreens. I think it may have the wrong hard-coded IO stack
depth in some versions, if I'm remembering correctly.
If I understand correctly Kbdstuff5.sys does not allow to use
interrupt hook.What your point ofview . Am I right?
I don't know what kbdstuff5 is, so I couldn't tell you...
--
../ray..


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@arx.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

Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@arx.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


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

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

You can't use the INF in the ddk as is. PNP0BAAD is a fake ID (ie, it's BAAD). You must construct your own INF and place all of the relevant matching hw ID's in the INf, see %windir%\inf\keyboard.inf. all the hw IDs that match to STANDARD_Inst are the ones you want.

D


From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Mark Shnaider
Sent: Tuesday, January 06, 2004 10:17 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Re: Installl Keyboard filter driver

Hello,
I have problem in understanding :
How can be installed? i8042prt upper filter (kbdfiltr) driver programmatically.
I? did not success to install DDK example kbfilrr programmatically, using kbfiltr.inf
The final function (in install program) UpdateDriverForPlugAndPlayDevces return TRUE.
The install program? does not? replace??? Registry? 0000
"DeviceDesc PC/AT Enhanced PS/2 Keyboard (101/102-Key)"
? under?? {4D36E96B-E325-11CE-BFC1-08002BE10318}
and create new Registry? 0001 " "DeviceDesc DDK Example ...",
?????????????????????????????????????????????? "MatchingDeiviceID???? *PNP0BAAD
In this case after reboot? kbfilr driver return error status (0xC000000E) to IRP
IRP_MN_START_DEVICE.
Any advice would be greatly appreciated.
mark

-----Original Message-----
From: Doron Holan [mailto:xxxxx@windows.microsoft.com]
Sent: Monday, November 17, 2003 7:24 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] Re: Keyboard filter driver and SMS

To install on the ps2 keyboard, you must have an INF that has all the possible ps2 keyboard hw ids (pnp03xx, where xx are some hex values).? See keyboard.inf for all of the relevant hw IDs for ps2 keyboards.
SMS has been fixed for a long time now, the current version should work just fine w/the ps2 stack.
D
This posting is provided "AS IS" with no warranties, and confers no rights


From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Mark Shnaider
Sent: Monday, November 17, 2003 2:19 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Re: Keyboard filter driver and SMS
Thank very much Doron and Ray for your explanation.
I understood that sending? IOCTL_INTERNAL_I8042_HOOK_KEYOBARD from
kbclass filter is not correct way.
But I have additional questions:
1.
? How can be installed? i8042prt upper filter driver programatically
(example? kbdfilr? from DDK), using install program.?
? I try to use? UpdateDriverForPlugAndPlayDevices but it? does not work
(? UpdateDriverForPlugAndPlayDevices dos not work by Ray notes? too).
? Any advice or suggestions and? would be greatly appreciated.
2.
?? Is Microsoft planning to release SMS version, supported? IOCLs for
hook keyboard interrupt ?
regards
Mark
-----Original Message-----
From: Doron Holan [mailto:xxxxx@windows.microsoft.com]
Sent: Thursday, November 13, 2003 7:59 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] Re: Keyboard filter driver and SMS
You should *not* be sending IOCTL_INTERNAL_I8042_HOOK_KEYOBARD from your driver.? Only i8042prt should send this IOCTL.? I wrote and owned this code, so please trust me.? Just because it kinda works today, doesn't mean it will work tomorrow, pleas stick to the intended design.? Everybody in the stacks assume that this is sent once and only once, if you look at the i8042prt code, there is no locking around the storing of the results of this IOCTL, which could lead to some very nasty crashes if you keep resending this request on your own.? If you need to dynamically change the hook routine, change it internally to your own driver (ie keep the hook routine constant through i8042prt's invocation of this irp and then from your constant routine variably call the appropriate routine that you would have been changing with the IOCTL call).
This IOCTL is specific to the ps2 stack anyways.? Sending it down arbitrary stacks makes no sense whatsoever.?
As for kbstuff5.sys, it is a version of the SMS virtual keyboard driver.? It only existed for one short termed release.? It was written before these IOCTLs were finalized and appears not to play very fairly with any filter driver, not just yours.? The current version of SMS doesn't ship this driver AFAIK.
D
This posting is provided "AS IS" with no warranties, and confers no rights


From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Mark Shnaider
Sent: Thursday, November 13, 2003 1:57 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Re: Keyboard filter driver and SMS
Hello,
Thank you very much for your answers.

  1. I think that? IOCTL_INTERNAL_I8042_HOOK_KEYOBARD IOCTL
    ?? can be sent later and change chain of interrupt hooks .
    ?? When AddDevice is called my driver build IOCTL_INTERNAL_I8042_HOOK_KEYOBARD IOCTL
    ?? and sent to device stack.
    ?? It works OK.
    2 The Kbdstuff5.sys is upper? keyboard? filter driver installed? by SMS.
    ??? See registry ?????? "System\CurrentControlSet\Control\Class\{4D36E96B-E325-11CE-BFC1-08002BE10318}\UpperFilters".
    ??? This? driver? does nor work? correct (to my opinion) with keyboard interrupt hooks.
    ???
  2. I will try to? find solution for this problem.
    ??? May be you know where can I get last SMS version. ?
    ??? May be this problem is solved in last SMS version ?
    regards
    Mark
    ??
    ???????
    -----Original Message-----
    From: Ray Trent [mailto:xxxxx@synaptics.com.spamblock]
    Sent: Thursday, November 13, 2003 3:49 AM
    To: Windows System Software Devs Interest List
    Subject: [ntdev] Re: Keyboard filter driver and SMS
    Mark Shnaider wrote:

Why only? the i8042 driver can send the
IOCTL_INTERNAL_I8042_HOOK_KEYOBARD IOCTL?
Well, it will send it once during initialization to the top of the
device stack for the PS/2 keyboard.
If you later send it, then filter drivers that might be installed might
become fatally confused, because they are not expecting a second one.
version
The my driver send IOCTL_INTERNAL_I8042_HOOK_KEYOBARD IOCTL
and kbdclass driver pass this IOCTL to the i8042 driver.? The driver
has IsrHook routine? for supporting exchange with? Smart card keyboard
reader.(special mode)
This driver performs also? monitoring keystrokes from?
keyboard.(transparent mode)
This is the *classic* example of a driver where a modified version of
kbfilter is intended to be installed as an i8042 upper filter. My driver
happens to be (mostly) a mouse driver rather than a keyboard driver, but
the 2 are completely analogous in terms of interface.
The i8042 upper filter will not solve this problem because
as I remember? kbfiltr.sys (i8042 upper filter driver? from DDK example,
used IOCTL_INTERNAL_I8042_HOOK_KEYOBARD IOCT)
does not works properly too if? SMS service was installed.!!!!
Well, you have to be careful how you install your filter. It should only
be installed on the devnode representing the PS/2 keyboard. If you do
that, then the SMS service will be irrelevant. However, this can be
somewhat tricky to do programatically in some cases.
UpdateDriverForPlugAndPlayDevices does a pretty good job at this, though.
My mouse driver also used to be installed as a keyboard filter driver
(don't ask :-). So I know that this works, as long as you don't install
on the SMS service's "fake" keyboard devnode.
If you do attach to the SMS keyboard devnode as an upper filter, there
is at least one bug in SMS (as far as I was able to determine) that will
cause bluescreens. I think it may have the wrong hard-coded IO stack
depth in some versions, if I'm remembering correctly.
If I understand correctly Kbdstuff5.sys does not allow to use
interrupt hook.What your point ofview . Am I right?
I don't know what kbdstuff5 is, so I couldn't tell you...
--
../ray..


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@arx.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

Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@arx.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

Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@arx.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

Hello Doron,
I constructed own INF file using Geninf from DDK.
but dot not success to install filter driver

Could you clarify a couple of thinks for me:
1.
If I understood correctly kbdclass and I8042prt driver must be
reinstalling
during installation I8042prt filter driver

  1. How can be inserted the relevant matching hw ID's (from keyboard.inf) in
    the INF
    It is right way?
    For example:

[Manufacturer]
%AR_Ex% = DDK_Ex.Mfg
%Std-Keyboards%=MS_KBD

[AR_Ex.Mfg]
%AR_Ex% = kbfiltr, *AR_Filter

[MS_KBD]
%*PNP0300.DeviceDesc% = kbfiltr,*PNP0300 ;PC/XT (83-Key)
%*PNP0301.DeviceDesc% = kbfiltr,*PNP0301 ;PC/AT (84-Key)
%*PNP0302.DeviceDesc% = kbfiltr,*PNP0302 ;PC/XT (84-Key)
%*PNP0303.DeviceDesc% = kbfiltr,*PNP0303 ;PC/AT Enh(101/102-Key)
%*PNP030b.DeviceDesc% = kbfiltr,*PNP030b,PS2_KEYBOARD ;Default keyboard

; General installation section

[kbfiltr]
; perform port related actions from keyboard.inf
Include=keyboard.inf
Needs=STANDARD_Inst

  1. May be you know example (article ,reference) which can help me.
    Thanks in advice
    Mark

-----Original Message-----
From: Doron Holan [mailto:xxxxx@windows.microsoft.com]
Sent: Tuesday, January 06, 2004 10:14 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Re: Installl Keyboard filter driver

You can't use the INF in the ddk as is. PNP0BAAD is a fake ID (ie, it's
BAAD). You must construct your own INF and place all of the relevant
matching hw ID's in the INf, see %windir%\inf\keyboard.inf. all the hw IDs
that match to STANDARD_Inst are the ones you want.

D


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Mark Shnaider
Sent: Tuesday, January 06, 2004 10:17 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Re: Installl Keyboard filter driver

Hello,
I have problem in understanding :
How can be installed? i8042prt upper filter (kbdfiltr) driver
programmatically.
I? did not success to install DDK example kbfilrr programmatically, using
kbfiltr.inf
The final function (in install program) UpdateDriverForPlugAndPlayDevces
return TRUE.
The install program? does not? replace??? Registry? 0000
"DeviceDesc PC/AT Enhanced PS/2 Keyboard (101/102-Key)"
? under?? {4D36E96B-E325-11CE-BFC1-08002BE10318}
and create new Registry? 0001 " "DeviceDesc DDK Example ...",
?????????????????????????????????????????????? "MatchingDeiviceID????
*PNP0BAAD
In this case after reboot? kbfilr driver return error status (0xC000000E) to
IRP
IRP_MN_START_DEVICE.
Any advice would be greatly appreciated.
mark

-----Original Message-----
From: Doron Holan [mailto:xxxxx@windows.microsoft.com]
Sent: Monday, November 17, 2003 7:24 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] Re: Keyboard filter driver and SMS

To install on the ps2 keyboard, you must have an INF that has all the
possible ps2 keyboard hw ids (pnp03xx, where xx are some hex values).? See
keyboard.inf for all of the relevant hw IDs for ps2 keyboards.
SMS has been fixed for a long time now, the current version should work just
fine w/the ps2 stack.
D
This posting is provided "AS IS" with no warranties, and confers no rights


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Mark Shnaider
Sent: Monday, November 17, 2003 2:19 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Re: Keyboard filter driver and SMS
Thank very much Doron and Ray for your explanation.
I understood that sending? IOCTL_INTERNAL_I8042_HOOK_KEYOBARD from
kbclass filter is not correct way.
But I have additional questions:
1.
? How can be installed? i8042prt upper filter driver programatically
(example? kbdfilr? from DDK), using install program.?
? I try to use? UpdateDriverForPlugAndPlayDevices but it? does not work
(? UpdateDriverForPlugAndPlayDevices dos not work by Ray notes? too).
? Any advice or suggestions and? would be greatly appreciated.
2.
?? Is Microsoft planning to release SMS version, supported? IOCLs for
hook keyboard interrupt ?
regards
Mark
-----Original Message-----
From: Doron Holan [mailto:xxxxx@windows.microsoft.com]
Sent: Thursday, November 13, 2003 7:59 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] Re: Keyboard filter driver and SMS
You should *not* be sending IOCTL_INTERNAL_I8042_HOOK_KEYOBARD from your
driver.? Only i8042prt should send this IOCTL.? I wrote and owned this code,
so please trust me.? Just because it kinda works today, doesn't mean it will
work tomorrow, pleas stick to the intended design.? Everybody in the stacks
assume that this is sent once and only once, if you look at the i8042prt
code, there is no locking around the storing of the results of this IOCTL,
which could lead to some very nasty crashes if you keep resending this
request on your own.? If you need to dynamically change the hook routine,
change it internally to your own driver (ie keep the hook routine constant
through i8042prt's invocation of this irp and then from your constant
routine variably call the appropriate routine that you would have been
changing with the IOCTL call).
This IOCTL is specific to the ps2 stack anyways.? Sending it down arbitrary
stacks makes no sense whatsoever.?
As for kbstuff5.sys, it is a version of the SMS virtual keyboard driver.? It
only existed for one short termed release.? It was written before these
IOCTLs were finalized and appears not to play very fairly with any filter
driver, not just yours.? The current version of SMS doesn't ship this driver
AFAIK.
D
This posting is provided "AS IS" with no warranties, and confers no rights


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Mark Shnaider
Sent: Thursday, November 13, 2003 1:57 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Re: Keyboard filter driver and SMS
Hello,
Thank you very much for your answers.

  1. I think that? IOCTL_INTERNAL_I8042_HOOK_KEYOBARD IOCTL
    ?? can be sent later and change chain of interrupt hooks .
    ?? When AddDevice is called my driver build
    IOCTL_INTERNAL_I8042_HOOK_KEYOBARD IOCTL
    ?? and sent to device stack.
    ?? It works OK.
    2 The Kbdstuff5.sys is upper? keyboard? filter driver installed? by SMS.
    ??? See registry ??????
    "System\CurrentControlSet\Control\Class\{4D36E96B-E325-11CE-BFC1-08002BE
    10318}\UpperFilters".
    ??? This? driver? does nor work? correct (to my opinion) with keyboard
    interrupt hooks.
    ???
  2. I will try to? find solution for this problem.
    ??? May be you know where can I get last SMS version. ?
    ??? May be this problem is solved in last SMS version ?
    regards
    Mark
    ??
    ???????
    -----Original Message-----
    From: Ray Trent [mailto:xxxxx@synaptics.com.spamblock]
    Sent: Thursday, November 13, 2003 3:49 AM
    To: Windows System Software Devs Interest List
    Subject: [ntdev] Re: Keyboard filter driver and SMS
    Mark Shnaider wrote:

Why only? the i8042 driver can send the
IOCTL_INTERNAL_I8042_HOOK_KEYOBARD IOCTL?
Well, it will send it once during initialization to the top of the
device stack for the PS/2 keyboard.
If you later send it, then filter drivers that might be installed might
become fatally confused, because they are not expecting a second one.
version
The my driver send IOCTL_INTERNAL_I8042_HOOK_KEYOBARD IOCTL
and kbdclass driver pass this IOCTL to the i8042 driver.? The driver
has IsrHook routine? for supporting exchange with? Smart card keyboard
reader.(special mode)
This driver performs also? monitoring keystrokes from?
keyboard.(transparent mode)
This is the *classic* example of a driver where a modified version of
kbfilter is intended to be installed as an i8042 upper filter. My driver
happens to be (mostly) a mouse driver rather than a keyboard driver, but
the 2 are completely analogous in terms of interface.
The i8042 upper filter will not solve this problem because
as I remember? kbfiltr.sys (i8042 upper filter driver? from DDK example,
used IOCTL_INTERNAL_I8042_HOOK_KEYOBARD IOCT)
does not works properly too if? SMS service was installed.!!!!
Well, you have to be careful how you install your filter. It should only
be installed on the devnode representing the PS/2 keyboard. If you do
that, then the SMS service will be irrelevant. However, this can be
somewhat tricky to do programatically in some cases.
UpdateDriverForPlugAndPlayDevices does a pretty good job at this, though.
My mouse driver also used to be installed as a keyboard filter driver
(don't ask :-). So I know that this works, as long as you don't install
on the SMS service's "fake" keyboard devnode.
If you do attach to the SMS keyboard devnode as an upper filter, there
is at least one bug in SMS (as far as I was able to determine) that will
cause bluescreens. I think it may have the wrong hard-coded IO stack
depth in some versions, if I'm remembering correctly.
If I understand correctly Kbdstuff5.sys does not allow to use
interrupt hook.What your point ofview . Am I right?
I don't know what kbdstuff5 is, so I couldn't tell you...
--
../ray..


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@arx.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

Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@arx.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

Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@arx.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


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

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

You need to look at the relevant AddReg entries in the kbfiltr.inf in the DDK. It demonstrates how to add the appropriate reg entry so that your filter is added to the stack. The .HW sections are the ones of interest.

D

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


From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Mark Shnaider
Sent: Thursday, January 08, 2004 9:03 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Re: Installl Keyboard filter driver

Hello Doron,
I constructed own INF file using Geninf? from DDK.
but dot not success to install filter driver
Could you clarify a couple of thinks for me:
1.
?If? I understood correctly? kbdclass and I8042prt driver must be? reinstalling
?during installation I8042prt filter driver
2. How can? be inserted the relevant matching hw ID's (from keyboard.inf) in the INF
It is right way?
For example:??
[Manufacturer]
%AR_Ex%?? = DDK_Ex.Mfg
%Std-Keyboards%=MS_KBD
[AR_Ex.Mfg]
%AR_Ex% = kbfiltr, *AR_Filter
[MS_KBD]
%*PNP0300.DeviceDesc%??? = kbfiltr,*PNP0300??????? ;PC/XT (83-Key)
%*PNP0301.DeviceDesc%??? = kbfiltr,*PNP0301??????? ;PC/AT (84-Key)
%*PNP0302.DeviceDesc%??? = kbfiltr,*PNP0302??????? ;PC/XT (84-Key)
%*PNP0303.DeviceDesc%??? = kbfiltr,*PNP0303??????? ;PC/AT Enh(101/102-Key)
%*PNP030b.DeviceDesc%??? = kbfiltr,*PNP030b,PS2_KEYBOARD?? ;Default keyboard
; General installation section
[kbfiltr]
; perform port related actions from keyboard.inf
Include=keyboard.inf
Needs=STANDARD_Inst
3. May be you know? example (article ,reference)?? which can help me.
?Thanks in advice
Mark

-----Original Message-----
From: Doron Holan [mailto:xxxxx@windows.microsoft.com]
Sent: Tuesday, January 06, 2004 10:14 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Re: Installl Keyboard filter driver

You can't use the INF in the ddk as is.? PNP0BAAD is a fake ID (ie, it's BAAD).? You must construct your own INF and place all of the relevant matching hw ID's in the INf, see %windir%\inf\keyboard.inf.? all the hw IDs that match to STANDARD_Inst are the ones you want.
D


From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Mark Shnaider
Sent: Tuesday, January 06, 2004 10:17 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Re: Installl Keyboard filter driver

Hello,
I have problem in understanding :
How can be installed? i8042prt upper filter (kbdfiltr) driver programmatically.
I? did not success to install DDK example kbfilrr programmatically, using kbfiltr.inf
The final function (in install program) UpdateDriverForPlugAndPlayDevces return TRUE.
The install program? does not? replace??? Registry? 0000
"DeviceDesc PC/AT Enhanced PS/2 Keyboard (101/102-Key)"
? under?? {4D36E96B-E325-11CE-BFC1-08002BE10318}
and create new Registry? 0001 " "DeviceDesc DDK Example ...",
?????????????????????????????????????????????? "MatchingDeiviceID???? *PNP0BAAD
In this case after reboot? kbfilr driver return error status (0xC000000E) to IRP
IRP_MN_START_DEVICE.
Any advice would be greatly appreciated.
mark

-----Original Message-----
From: Doron Holan [mailto:xxxxx@windows.microsoft.com]
Sent: Monday, November 17, 2003 7:24 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] Re: Keyboard filter driver and SMS
To install on the ps2 keyboard, you must have an INF that has all the possible ps2 keyboard hw ids (pnp03xx, where xx are some hex values).? See keyboard.inf for all of the relevant hw IDs for ps2 keyboards.
SMS has been fixed for a long time now, the current version should work just fine w/the ps2 stack.
D
This posting is provided "AS IS" with no warranties, and confers no rights


From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Mark Shnaider
Sent: Monday, November 17, 2003 2:19 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Re: Keyboard filter driver and SMS
Thank very much Doron and Ray for your explanation.
I understood that sending? IOCTL_INTERNAL_I8042_HOOK_KEYOBARD from
kbclass filter is not correct way.
But I have additional questions:
1.
? How can be installed? i8042prt upper filter driver programatically
(example? kbdfilr? from DDK), using install program.?
? I try to use? UpdateDriverForPlugAndPlayDevices but it? does not work
(? UpdateDriverForPlugAndPlayDevices dos not work by Ray notes? too).
? Any advice or suggestions and? would be greatly appreciated.
2.
?? Is Microsoft planning to release SMS version, supported? IOCLs for
hook keyboard interrupt ?
regards
Mark
-----Original Message-----
From: Doron Holan [mailto:xxxxx@windows.microsoft.com]
Sent: Thursday, November 13, 2003 7:59 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] Re: Keyboard filter driver and SMS
You should *not* be sending IOCTL_INTERNAL_I8042_HOOK_KEYOBARD from your driver.? Only i8042prt should send this IOCTL.? I wrote and owned this code, so please trust me.? Just because it kinda works today, doesn't mean it will work tomorrow, pleas stick to the intended design.? Everybody in the stacks assume that this is sent once and only once, if you look at the i8042prt code, there is no locking around the storing of the results of this IOCTL, which could lead to some very nasty crashes if you keep resending this request on your own.? If you need to dynamically change the hook routine, change it internally to your own driver (ie keep the hook routine constant through i8042prt's invocation of this irp and then from your constant routine variably call the appropriate routine that you would have been changing with the IOCTL call).
This IOCTL is specific to the ps2 stack anyways.? Sending it down arbitrary stacks makes no sense whatsoever.?
As for kbstuff5.sys, it is a version of the SMS virtual keyboard driver.? It only existed for one short termed release.? It was written before these IOCTLs were finalized and appears not to play very fairly with any filter driver, not just yours.? The current version of SMS doesn't ship this driver AFAIK.
D
This posting is provided "AS IS" with no warranties, and confers no rights


From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Mark Shnaider
Sent: Thursday, November 13, 2003 1:57 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Re: Keyboard filter driver and SMS
Hello,
Thank you very much for your answers.

  1. I think that? IOCTL_INTERNAL_I8042_HOOK_KEYOBARD IOCTL
    ?? can be sent later and change chain of interrupt hooks .
    ?? When AddDevice is called my driver build IOCTL_INTERNAL_I8042_HOOK_KEYOBARD IOCTL
    ?? and sent to device stack.
    ?? It works OK.
    2 The Kbdstuff5.sys is upper? keyboard? filter driver installed? by SMS.
    ??? See registry ?????? "System\CurrentControlSet\Control\Class\{4D36E96B-E325-11CE-BFC1-08002BE10318}\UpperFilters".
    ??? This? driver? does nor work? correct (to my opinion) with keyboard interrupt hooks.
    ???
  2. I will try to? find solution for this problem.
    ??? May be you know where can I get last SMS version. ?
    ??? May be this problem is solved in last SMS version ?
    regards
    Mark
    ??
    ???????
    -----Original Message-----
    From: Ray Trent [mailto:xxxxx@synaptics.com.spamblock]
    Sent: Thursday, November 13, 2003 3:49 AM
    To: Windows System Software Devs Interest List
    Subject: [ntdev] Re: Keyboard filter driver and SMS
    Mark Shnaider wrote:

Why only? the i8042 driver can send the
IOCTL_INTERNAL_I8042_HOOK_KEYOBARD IOCTL?
Well, it will send it once during initialization to the top of the
device stack for the PS/2 keyboard.
If you later send it, then filter drivers that might be installed might
become fatally confused, because they are not expecting a second one.
version
The my driver send IOCTL_INTERNAL_I8042_HOOK_KEYOBARD IOCTL
and kbdclass driver pass this IOCTL to the i8042 driver.? The driver
has IsrHook routine? for supporting exchange with? Smart card keyboard
reader.(special mode)
This driver performs also? monitoring keystrokes from?
keyboard.(transparent mode)
This is the *classic* example of a driver where a modified version of
kbfilter is intended to be installed as an i8042 upper filter. My driver
happens to be (mostly) a mouse driver rather than a keyboard driver, but
the 2 are completely analogous in terms of interface.
The i8042 upper filter will not solve this problem because
as I remember? kbfiltr.sys (i8042 upper filter driver? from DDK example,
used IOCTL_INTERNAL_I8042_HOOK_KEYOBARD IOCT)
does not works properly too if? SMS service was installed.!!!!
Well, you have to be careful how you install your filter. It should only
be installed on the devnode representing the PS/2 keyboard. If you do
that, then the SMS service will be irrelevant. However, this can be
somewhat tricky to do programatically in some cases.
UpdateDriverForPlugAndPlayDevices does a pretty good job at this, though.
My mouse driver also used to be installed as a keyboard filter driver
(don't ask :-). So I know that this works, as long as you don't install
on the SMS service's "fake" keyboard devnode.
If you do attach to the SMS keyboard devnode as an upper filter, there
is at least one bug in SMS (as far as I was able to determine) that will
cause bluescreens. I think it may have the wrong hard-coded IO stack
depth in some versions, if I'm remembering correctly.
If I understand correctly Kbdstuff5.sys does not allow to use
interrupt hook.What your point ofview . Am I right?
I don't know what kbdstuff5 is, so I couldn't tell you...
--
../ray..


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@arx.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

Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@arx.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

Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@arx.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

Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@arx.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

Thanks Doron,
Now I success to install keyoboard filter driver.
regards
Mark

-----Original Message-----
From: Doron Holan [mailto:xxxxx@windows.microsoft.com]
Sent: Friday, January 09, 2004 2:26 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Re: Installl Keyboard filter driver

You need to look at the relevant AddReg entries in the kbfiltr.inf in the
DDK. It demonstrates how to add the appropriate reg entry so that your
filter is added to the stack. The .HW sections are the ones of interest.

D

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


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Mark Shnaider
Sent: Thursday, January 08, 2004 9:03 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Re: Installl Keyboard filter driver

Hello Doron,
I constructed own INF file using Geninf? from DDK.
but dot not success to install filter driver
Could you clarify a couple of thinks for me:
1.
?If? I understood correctly? kbdclass and I8042prt driver must be?
reinstalling
?during installation I8042prt filter driver
2. How can? be inserted the relevant matching hw ID's (from keyboard.inf) in
the INF
It is right way?
For example:??
[Manufacturer]
%AR_Ex%?? = DDK_Ex.Mfg
%Std-Keyboards%=MS_KBD
[AR_Ex.Mfg]
%AR_Ex% = kbfiltr, *AR_Filter
[MS_KBD]
%*PNP0300.DeviceDesc%??? = kbfiltr,*PNP0300??????? ;PC/XT (83-Key)
%*PNP0301.DeviceDesc%??? = kbfiltr,*PNP0301??????? ;PC/AT (84-Key)
%*PNP0302.DeviceDesc%??? = kbfiltr,*PNP0302??????? ;PC/XT (84-Key)
%*PNP0303.DeviceDesc%??? = kbfiltr,*PNP0303??????? ;PC/AT Enh(101/102-Key)
%*PNP030b.DeviceDesc%??? = kbfiltr,*PNP030b,PS2_KEYBOARD?? ;Default keyboard

; General installation section
[kbfiltr]
; perform port related actions from keyboard.inf
Include=keyboard.inf
Needs=STANDARD_Inst
3. May be you know? example (article ,reference)?? which can help me.
?Thanks in advice
Mark

-----Original Message-----
From: Doron Holan [mailto:xxxxx@windows.microsoft.com]
Sent: Tuesday, January 06, 2004 10:14 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Re: Installl Keyboard filter driver

You can't use the INF in the ddk as is.? PNP0BAAD is a fake ID (ie, it's
BAAD).? You must construct your own INF and place all of the relevant
matching hw ID's in the INf, see %windir%\inf\keyboard.inf.? all the hw IDs
that match to STANDARD_Inst are the ones you want.
D


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Mark Shnaider
Sent: Tuesday, January 06, 2004 10:17 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Re: Installl Keyboard filter driver

Hello,
I have problem in understanding :
How can be installed? i8042prt upper filter (kbdfiltr) driver
programmatically.
I? did not success to install DDK example kbfilrr programmatically, using
kbfiltr.inf
The final function (in install program) UpdateDriverForPlugAndPlayDevces
return TRUE.
The install program? does not? replace??? Registry? 0000
"DeviceDesc PC/AT Enhanced PS/2 Keyboard (101/102-Key)"
? under?? {4D36E96B-E325-11CE-BFC1-08002BE10318}
and create new Registry? 0001 " "DeviceDesc DDK Example ...",
?????????????????????????????????????????????? "MatchingDeiviceID????
*PNP0BAAD
In this case after reboot? kbfilr driver return error status (0xC000000E) to
IRP
IRP_MN_START_DEVICE.
Any advice would be greatly appreciated.
mark

-----Original Message-----
From: Doron Holan [mailto:xxxxx@windows.microsoft.com]
Sent: Monday, November 17, 2003 7:24 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] Re: Keyboard filter driver and SMS
To install on the ps2 keyboard, you must have an INF that has all the
possible ps2 keyboard hw ids (pnp03xx, where xx are some hex values).? See
keyboard.inf for all of the relevant hw IDs for ps2 keyboards.
SMS has been fixed for a long time now, the current version should work just
fine w/the ps2 stack.
D
This posting is provided "AS IS" with no warranties, and confers no rights


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Mark Shnaider
Sent: Monday, November 17, 2003 2:19 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Re: Keyboard filter driver and SMS
Thank very much Doron and Ray for your explanation.
I understood that sending? IOCTL_INTERNAL_I8042_HOOK_KEYOBARD from
kbclass filter is not correct way.
But I have additional questions:
1.
? How can be installed? i8042prt upper filter driver programatically
(example? kbdfilr? from DDK), using install program.?
? I try to use? UpdateDriverForPlugAndPlayDevices but it? does not work
(? UpdateDriverForPlugAndPlayDevices dos not work by Ray notes? too).
? Any advice or suggestions and? would be greatly appreciated.
2.
?? Is Microsoft planning to release SMS version, supported? IOCLs for
hook keyboard interrupt ?
regards
Mark
-----Original Message-----
From: Doron Holan [mailto:xxxxx@windows.microsoft.com]
Sent: Thursday, November 13, 2003 7:59 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] Re: Keyboard filter driver and SMS
You should *not* be sending IOCTL_INTERNAL_I8042_HOOK_KEYOBARD from your
driver.? Only i8042prt should send this IOCTL.? I wrote and owned this code,
so please trust me.? Just because it kinda works today, doesn't mean it will
work tomorrow, pleas stick to the intended design.? Everybody in the stacks
assume that this is sent once and only once, if you look at the i8042prt
code, there is no locking around the storing of the results of this IOCTL,
which could lead to some very nasty crashes if you keep resending this
request on your own.? If you need to dynamically change the hook routine,
change it internally to your own driver (ie keep the hook routine constant
through i8042prt's invocation of this irp and then from your constant
routine variably call the appropriate routine that you would have been
changing with the IOCTL call).
This IOCTL is specific to the ps2 stack anyways.? Sending it down arbitrary
stacks makes no sense whatsoever.?
As for kbstuff5.sys, it is a version of the SMS virtual keyboard driver.? It
only existed for one short termed release.? It was written before these
IOCTLs were finalized and appears not to play very fairly with any filter
driver, not just yours.? The current version of SMS doesn't ship this driver
AFAIK.
D
This posting is provided "AS IS" with no warranties, and confers no rights


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Mark Shnaider
Sent: Thursday, November 13, 2003 1:57 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Re: Keyboard filter driver and SMS
Hello,
Thank you very much for your answers.

  1. I think that? IOCTL_INTERNAL_I8042_HOOK_KEYOBARD IOCTL
    ?? can be sent later and change chain of interrupt hooks .
    ?? When AddDevice is called my driver build
    IOCTL_INTERNAL_I8042_HOOK_KEYOBARD IOCTL
    ?? and sent to device stack.
    ?? It works OK.
    2 The Kbdstuff5.sys is upper? keyboard? filter driver installed? by SMS.
    ??? See registry ??????
    "System\CurrentControlSet\Control\Class\{4D36E96B-E325-11CE-BFC1-08002BE
    10318}\UpperFilters".
    ??? This? driver? does nor work? correct (to my opinion) with keyboard
    interrupt hooks.
    ???
  2. I will try to? find solution for this problem.
    ??? May be you know where can I get last SMS version. ?
    ??? May be this problem is solved in last SMS version ?
    regards
    Mark
    ??
    ???????
    -----Original Message-----
    From: Ray Trent [mailto:xxxxx@synaptics.com.spamblock]
    Sent: Thursday, November 13, 2003 3:49 AM
    To: Windows System Software Devs Interest List
    Subject: [ntdev] Re: Keyboard filter driver and SMS
    Mark Shnaider wrote:

Why only? the i8042 driver can send the
IOCTL_INTERNAL_I8042_HOOK_KEYOBARD IOCTL?
Well, it will send it once during initialization to the top of the
device stack for the PS/2 keyboard.
If you later send it, then filter drivers that might be installed might
become fatally confused, because they are not expecting a second one.
version
The my driver send IOCTL_INTERNAL_I8042_HOOK_KEYOBARD IOCTL
and kbdclass driver pass this IOCTL to the i8042 driver.? The driver
has IsrHook routine? for supporting exchange with? Smart card keyboard
reader.(special mode)
This driver performs also? monitoring keystrokes from?
keyboard.(transparent mode)
This is the *classic* example of a driver where a modified version of
kbfilter is intended to be installed as an i8042 upper filter. My driver
happens to be (mostly) a mouse driver rather than a keyboard driver, but
the 2 are completely analogous in terms of interface.
The i8042 upper filter will not solve this problem because
as I remember? kbfiltr.sys (i8042 upper filter driver? from DDK example,
used IOCTL_INTERNAL_I8042_HOOK_KEYOBARD IOCT)
does not works properly too if? SMS service was installed.!!!!
Well, you have to be careful how you install your filter. It should only
be installed on the devnode representing the PS/2 keyboard. If you do
that, then the SMS service will be irrelevant. However, this can be
somewhat tricky to do programatically in some cases.
UpdateDriverForPlugAndPlayDevices does a pretty good job at this, though.
My mouse driver also used to be installed as a keyboard filter driver
(don't ask :-). So I know that this works, as long as you don't install
on the SMS service's "fake" keyboard devnode.
If you do attach to the SMS keyboard devnode as an upper filter, there
is at least one bug in SMS (as far as I was able to determine) that will
cause bluescreens. I think it may have the wrong hard-coded IO stack
depth in some versions, if I'm remembering correctly.
If I understand correctly Kbdstuff5.sys does not allow to use
interrupt hook.What your point ofview . Am I right?
I don't know what kbdstuff5 is, so I couldn't tell you...
--
../ray..


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@arx.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

Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@arx.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

Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@arx.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

Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@arx.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


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

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