Re: how to determine if given IRP is completed?

Tech-Archive recommends: Fix windows errors by optimizing your registry



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@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:2277B743-1807-4EE7-949C-F663BDF2E3D5@xxxxxxxxxxxxxxxx
> 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:
>
>> 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@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
>> news:077569EE-7C24-4032-85A2-918AE35112BE@xxxxxxxxxxxxxxxx
>> > 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.
>>
>>
>>


.



Relevant Pages

  • Re: problem to understand behavior of I/O manager
    ... IO manager calls the "current" driver which which the file object is ... deref the file handle to the file object using ObReferenceObjectByHandle ... allocate an IRP for this device object and associate it with the buffer ...
    (microsoft.public.development.device.drivers)
  • Re: drive present detection?
    ... the free space of all online drives. ... If the underlying device driver determines that the media has not ... changed, the driver should complete the IRP, returning the IoStatus ...
    (microsoft.public.win32.programmer.kernel)
  • winddk7600.16385.0srcinputvserialVSerial.c WDK 1.9 IRP_MN_QUERY_ID can not pass DTM Device Path Exer
    ... I've developed a virtual HID driver for win 7 which I have to implement ... IRP_MN_QUERY_ID to report Hardware IDs, ... if forward IRP to lower device, got The driver has responded to an IRP ... PWCHAR buffer = NULL; ...
    (microsoft.public.development.device.drivers)
  • Re: Questions about I/O Buffers
    ... Windows Driver Developer Support ... > I am developing the firmware of a camera that talks to Microsoft USB Video ... > IRP ... >>> I look into the IRP packet that sends DEVICE_CONTROL to low layer. ...
    (microsoft.public.development.device.drivers)
  • Re: Propagating the Pending Bit
    ... Here is the quotation from IoMarkIrpPending documentation in WDK ... If a driver sets an IoCompletion routine for an IRP and then passes the ...
    (microsoft.public.development.device.drivers)