keyboard filter missing Irp completion

I have a keyboard filter running under NT 4.0 and everything works fine
with one exception. I’m monitoring keystrokes by looking at the IRP_MJ_READ
IRPs moving through my driver. My problem is the very first keystroke that
occurs after my driver loads. Debug statements show that the IRP for the
“key down” does enter my read routine, my IRP completion routine is
successfully set and then the IRP is successfully passed down to the
filtered device. However, I never see the IRP in the completion routine
(which is where the keyboard data is actually available). This only happens
on the very first IRP. The corresponding “key up” IRP for that first
keystroke is seen in both my read and my completion routines. Every
following keystroke also works correctly.

More info:

  1. When I set my completion routine, I pass TRUE for the three InvokeOnXxx
    parameters.
  2. This problem occurs whether I load the driver during boot or load it
    dynamically later after a user has logged on.
  3. The first keystroke doesn’t have to be a “real” key - it does the same
    thing whether it is an alphabetic key or something like the CTRL or SHIFT
    key.
  4. Which service pack is installed doesn’t make a difference - I’ve tried 3
    different ones and they all (mis)behave the same.

Any and all help will be greatly appreciated.

Judy Labovitz

You should start your driver before the system thread makes first
IRP_MJ_READ. For example, you can start your filter on boot just after
kbdclass in Keyboard Class group.


Bye,
Sab

-----Original Message-----
From: xxxxx@itt.com [SMTP:xxxxx@itt.com]
Sent: Friday, May 12, 2000 10:45 AM
To: NT Developers Interest List
Subject: [ntdev] keyboard filter missing Irp completion

I have a keyboard filter running under NT 4.0 and everything works
fine
with one exception. I’m monitoring keystrokes by looking at the
IRP_MJ_READ
IRPs moving through my driver. My problem is the very first keystroke
that
occurs after my driver loads. Debug statements show that the IRP for
the
“key down” does enter my read routine, my IRP completion routine is
successfully set and then the IRP is successfully passed down to the
filtered device. However, I never see the IRP in the completion
routine
(which is where the keyboard data is actually available). This only
happens
on the very first IRP. The corresponding “key up” IRP for that first
keystroke is seen in both my read and my completion routines. Every
following keystroke also works correctly.

More info:

  1. When I set my completion routine, I pass TRUE for the three
    InvokeOnXxx
    parameters.
  2. This problem occurs whether I load the driver during boot or load
    it
    dynamically later after a user has logged on.
  3. The first keystroke doesn’t have to be a “real” key - it does the
    same
    thing whether it is an alphabetic key or something like the CTRL or
    SHIFT
    key.
  4. Which service pack is installed doesn’t make a difference - I’ve
    tried 3
    different ones and they all (mis)behave the same.

Any and all help will be greatly appreciated.

Judy Labovitz


You are currently subscribed to ntdev as: xxxxx@mastereye.kiev.ua
To unsubscribe send a blank email to $subst(‘Email.Unsub’)

I don’t think this is the problem. I’m not missing that first IRP_MJ_READ
in my filter. The io completion routine I set when I process that very
first read is never called. If the completion routine is never called, I
never get the keyboard data.

Judy

On 05/12/00, ““Sasha Bublik - (BS)” ” wrote:
> You should start your driver before the system thread makes first
> IRP_MJ_READ. For example, you can start your filter on boot just after
> kbdclass in Keyboard Class group.
>
> > I have a keyboard filter running under NT 4.0 and everything works
> > fine
> > with one exception. I’m monitoring keystrokes by looking at the
> > IRP_MJ_READ
> > IRPs moving through my driver. My problem is the very first keystroke
> > that
> > occurs after my driver loads. Debug statements show that the IRP for
> > the
> > “key down” does enter my read routine, my IRP completion routine is
> > successfully set and then the IRP is successfully passed down to the
> > filtered device. However, I never see the IRP in the completion
> > routine
> > (which is where the keyboard data is actually available). This only
> > happens
> > on the very first IRP. The corresponding “key up” IRP for that first
> > keystroke is seen in both my read and my completion routines. Every
> > following keystroke also works correctly.
> >
> > More info:
> > 1) When I set my completion routine, I pass TRUE for the three
> > InvokeOnXxx
> > parameters.
> > 2) This problem occurs whether I load the driver during boot or load
> > it
> > dynamically later after a user has logged on.
> > 3) The first keystroke doesn’t have to be a “real” key - it does the
> > same
> > thing whether it is an alphabetic key or something like the CTRL or
> > SHIFT
> > key.
> > 4) Which service pack is installed doesn’t make a difference - I’ve
> > tried 3
> > different ones and they all (mis)behave the same.
> >
> > Any and all help will be greatly appreciated.
> >
> > Judy Labovitz

Then your problem is very strange. I don’t have any problems with my
keyboard filter. However I would suggest to check the problem which I’ve
described.


Bye,
Sab

-----Original Message-----
From: xxxxx@itt.com [SMTP:xxxxx@itt.com]
Sent: Friday, May 12, 2000 4:23 PM
To: NT Developers Interest List
Subject: [ntdev] RE: keyboard filter missing Irp completion

I don’t think this is the problem. I’m not missing that first
IRP_MJ_READ
in my filter. The io completion routine I set when I process that very

first read is never called. If the completion routine is never called,
I
never get the keyboard data.

Judy

On 05/12/00, ““Sasha Bublik - (BS)” ” wrote:
> > You should start your driver before the system thread makes first
> > IRP_MJ_READ. For example, you can start your filter on boot just
> after
> > kbdclass in Keyboard Class group.
> >
> > > I have a keyboard filter running under NT 4.0 and everything works
> > > fine
> > > with one exception. I’m monitoring keystrokes by looking at the
> > > IRP_MJ_READ
> > > IRPs moving through my driver. My problem is the very first
> keystroke
> > > that
> > > occurs after my driver loads. Debug statements show that the IRP
> for
> > > the
> > > “key down” does enter my read routine, my IRP completion routine
> is
> > > successfully set and then the IRP is successfully passed down to
> the
> > > filtered device. However, I never see the IRP in the completion
> > > routine
> > > (which is where the keyboard data is actually available). This
> only
> > > happens
> > > on the very first IRP. The corresponding “key up” IRP for that
> first
> > > keystroke is seen in both my read and my completion routines.
> Every
> > > following keystroke also works correctly.
> > >
> > > More info:
> > > 1) When I set my completion routine, I pass TRUE for the three
> > > InvokeOnXxx
> > > parameters.
> > > 2) This problem occurs whether I load the driver during boot or
> load
> > > it
> > > dynamically later after a user has logged on.
> > > 3) The first keystroke doesn’t have to be a “real” key - it does
> the
> > > same
> > > thing whether it is an alphabetic key or something like the CTRL
> or
> > > SHIFT
> > > key.
> > > 4) Which service pack is installed doesn’t make a difference -
> I’ve
> > > tried 3
> > > different ones and they all (mis)behave the same.
> > >
> > > Any and all help will be greatly appreciated.
> > >
> > > Judy Labovitz
>
> —
> You are currently subscribed to ntdev as: xxxxx@mastereye.kiev.ua
> To unsubscribe send a blank email to $subst(‘Email.Unsub’)