- how to determine if given IRP is completed?
- Posted by Isajanyan on June 4th, 2005
Hi,
Could anyone tell me how to determine if given IRP is completed?
Here is my problem: I have a keyboard filter driver based on Ctrl2Cap from
sysinternals.
I need it to generate keystrokes. In order to do that I hold a global
pointer to the last IRP passed to the lower driver in stack and if there is a
need to generate a keystroke I complete that IRP, the IO manager creates and
sends another IRP to me which I fill with the data, complete and return
without passing it down (is this method right by the way, if not which is the
right method?). The bugcheck sometimes occur when I complete the globally
saved IRP which has been already completed by lower driver in stack, that's
why I'm thinking of checking somehow if IRP has been completed and complete
it only if it has not.
Any suggestions are welcome, thanks to everyone.
- Posted by Doron Holan [MS] on June 4th, 2005
use kbfiltr instead. for your scheme to work, you need to catch the read
irp, send your own read irp down teh stack and complete teh caught read irp
when either
a) you have your own data to report
or
b) the lower stack has data to report via the irp you sent
in either case, if there is no pending irp, you have to store teh data in a
buffer and then complete the incoming read irp immediately if you have
stored data.
all of this complexity goes away if you use kbfiltr and just invoke the
upper service callback routine when you have data to report.
d
--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.
"Isajanyan" <Isajanyan@discussions.microsoft.com> wrote in message
news:077569EE-7C24-4032-85A2-918AE35112BE@microsoft.com...
- Posted by Isajanyan on June 4th, 2005
Doron, thank you very much for your answer. Ok, so it seems there is no way
to determine if the IRP is completed and my approach was wrong.
I considered using kbfiltr, but the installation of that driver seems to be
different (it requires using device manager, which is unacceptable in my
case). Could you please give me some info on how to install it
programmatically either using inf file or without (if possible)?
Thanks again
"Doron Holan [MS]" wrote:
- Posted by Doron Holan [MS] on June 4th, 2005
look at the sources for devcon, which basically is a cmd line device
manager-like tool. from there you can update the device's drivers.
d
--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.
"Isajanyan" <Isajanyan@discussions.microsoft.com> wrote in message
news:2277B743-1807-4EE7-949C-F663BDF2E3D5@microsoft.com...
- Posted by Isajanyan on June 4th, 2005
Thank you very much.
"Doron Holan [MS]" wrote: