- What to do with RemoveLock if Irp is Canceled?
- Posted by Dennis Burns on October 16th, 2004
I create an Irp (and an associated Urb). Before passing Irp/Urb down the
stack, I set a completion routine and I acquire a RemoveLock with
IoAcquireRemoveLock. I release the lock in the completion routine with
IoReleaseRemoveLock.
But there are situations when I'd like to cancel the Irp. If I do, how can I
be sure that the lock is released? Is the reference to the lock
automatically removed if the Irp is canceled?
By the way, I use Oney's generic.sys as a base, which does initialize the
RemoveLock. I don't know if it does anything special to release "orphan"
locks.
Thanks in advance,
Dennis
- Posted by Alexander Grigoriev on October 16th, 2004
If you cancel the IRP, its completion routine will be eventually called.
"Dennis Burns" <dburns@rtessentials.com> wrote in message
news:OIpnE54sEHA.3580@TK2MSFTNGP10.phx.gbl...
- Posted by Dennis Burns on October 16th, 2004
Hello Alexander,
Thanks for the help,
Dennis
"Alexander Grigoriev" <alegr@earthlink.net> wrote in message
news:u6XOAh5sEHA.1216@TK2MSFTNGP10.phx.gbl...
- Re: Check disk has been canceled? (Microsoft Windows) by MateuszG
- Canceled series recording then started again but now i get duplica (Windows Media Center Edition) by Pacman
- Team America -- DVD delayed? Canceled? (Video & DVD) by atd1999
- Re: canceled address (Computers & Technology) by Boomer
- Re: Duel canceled (Video & DVD) by Brockhurst Pertwee

