RE: [ntdev]Walter Owney's code for IoCancelIrp

So your completion side looks something like:

devExt->LockIrpQueue();

Irp = devExt->getNextIrp();
CancelRoutine = IoSetCancelRoutine(Irp, NULL);
if (Irp == NULL) {

^^^^^^^ That of course ought to be if (CancelRoutine == NULL) ^^^^^^^
//
// oops, my cancel routine is about to complete this irp! put it on
// my cancel queue so my cancel routine can remove it from there
// NB we could use InitializeListHead also - but there would then be
// no way to debug these irps.
//
devExt->putIrpOnCancelQueue(Irp);

} else {
…// do some stuff
IoCompleteRequset(Irp, …);

}

devExt->UnLockIrpQueue();


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com