The information in this article applies to:
SUMMARYThis article explains why it is possible for deviceObject->currentIrp == NULL in an ISR. MORE INFORMATION
The only routines in the system that change deviceObject->currentIrp are
IoStartPacket and IoStartNextPacket.
Sample Code
If you don't use IoStart[Next]Packet, this field will always be NULL unless you change it yourself. There is probably no real reason to change it because if you aren't using IoStart[Next]Packet, it's probably because you support more than one "current" IRP. Therefore, having a single pointer to "the current IRP" is unnecessary. If you are using IoStart[Next]Packet and you find that this field is NULL in your ISR, it means that you have already called IoStartNextPacket before the ISR was invoked and IoStartNextPacket did not find any more IRPs on the DeviceQueue. Along with clearing the DeviceQueue->Busy bit, IoStartNextPacket NULLs the CurrentIrp pointer when the device queue is empty. These are the only two things in the system that manipulate the dvcObj- >DeviceQueue.Busy or dvcObj->CurrentIrp.
Keywords : kbcode NTDDKKMode |
Last Reviewed: March 5, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |