Re: BSOD with IRP_MULTIPLE_REQUEST [NT 4 SP6]

Nicolas Mugnier wrote:

OK, I’v solved the BSOD. But now my new problem is:

  • If I set a cancel routine, the I/O managers cancels the IRP immediatly
  • If I do not set a cancel routine, the I/O managers doesn’t seem to
    cancel the IRP at CloseHandle()
    So I tried to use my own device queue, but I have the same result:

Your code has still got several race conditions. I *earnestly* recommend
that you read my book (like I recommended on another newsgroup) or use
the cancel-safe queue routines. The 2d edition of the book explains IRP
cancellation in great detail, and the explanation applies to NT4 as well
as to the WDM systems. The CSQ routines are implemented in a static
library that’s part of the XP DDK, so you should be able to use them in
a driver in NT4. You will need to tweak the build settings a bit to
include that library, of course.

BTW, you probably need an IRP_MJ_CLEANUP dispatch routine to cancel
queued IRPs at CloseHandle time.


Walter Oney, Consulting and Training
Basic and Advanced Driver Programming Seminars
Now teaming with John Hyde for USB Device Engineering Seminars
Check out our schedule at http://www.oneysoft.com