Re: More status woes
- From: "David J. Craig" <Dave@xxxxxxxxxxxxx>
- Date: Mon, 11 Dec 2006 22:32:58 -0800
The IO Manager uses the return value and the value in the IO_STATUS block.
How and when it uses them only Microsoft knows. If a driver does - from the
dispatch routine - return(IoCallDriver(xxx, xxx) then the IO_STATUS block
has no meaning for it in the dispatch routine. It might have a completion
routine where the return value is a binary (on/off) type where
STATUS_MORE_PROCESSING_REQUIRED is the 'true' case and all other 'false' or
vice versa depending upon your viewpoint. The originator who sends an IRP,
other than the IO Manager, should never return the value from IoCallDriver
that it receives. It is replacing the IO Manager for that IRP unless the
IRP was allocated via one of the build-type calls where the true owner is
the IO Manager who knows how to clean it up.
<BubbaGump> wrote in message
news:aiprn2dd5d200i2s23scrn3sj1jc68374k@xxxxxxxxxx
Here's some more perspective splintered from that thread about
NT_SUCCESS propagation. The rule that a dispatch routine must either
return STATUS_PENDING or the IRP's IoStatus.Status is cumbersome for
the receiver who completes an IRP and useless for the originator who
sends an IRP.
What advantage is it to place the same value in two locations that are
both equally accessible from the entity that needs to retrieve them?
It isn't as if the return value of the dispatch routine can be
accessed immediately by itself. It must be first checked to make sure
it isn't STATUS_PENDING:
If it is then the IRP's status will be available at
IoStatus.Status when it is completed.
If it isn't then the IRP's status will be available at
IoStatus.Status when it is completed.
Before the IRP is complete its status is indeterminate, and after the
IRP is complete the originator can always check IoStatus.Status, so
why does the receiver have to go through pains to make sure every time
it updates IoStatus.Status that it also updates its dispatch routine's
return value?
The return value from a dispatch routine could have simply been
designed to indicate whether the IRP was pended or not (two possible
values).
.
- Prev by Date: Re: XP or XPe Video driver for vertical oriented display (turned on en
- Next by Date: ICMP: not resolved.
- Previous by thread: Re: XP or XPe Video driver for vertical oriented display (turned on en
- Next by thread: ICMP: not resolved.
- Index(es):
Relevant Pages
|