Maxim
Wed May 25 14:15:47 CDT 2005
> What is the difference between setting Irp->IoStatus.Status and the Dipatch
> function return value?
The Dispatch function's return value can be STATUS_PENDING. This is the main
difference (and the main use of this return value).
The Dispatch function can finish with must either:
- call IoCompleteRequest inline, filling ->IoStatus before it. In this case,
the return value must be the same as ->IoStatus.Status
- do "return IoCallDriver". In this case, neither IoCompleteRequest nor
IoMarkIrpPending can be called.
- do IoMarkIrpPending and return STATUS_PENDING. IoCompleteRequest will be
called by some other routine later.
--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com