Re: IOSetCompletion Routine?
- From: umesh <umesh@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 2 Jan 2009 06:05:01 -0800
First Scenario:
It means that if lower driver returns STATUS_PENDING, then
Pix_IrpCompletionRoutine function will not executed at all or in other terms
Pix_IrpCompletionRoutine function will be executed only when lower driver
returns STATUS_SUCCESS (please correct if i am wrong).
Second scenario:
When we returning STATUS_MORE_PROCESSING_REQUIRED, what other work we are
performing in below sequence calls (in order to stop the call stack to
proceed above the current driver).
Regards
wanni
"Don Burn" wrote:
The status pending will occur when the next lower driver returns from its.
dispatch routine with the status STATUS_PENDING. The
STATUS_MORE_PROCESSING_REQUIRED is needed since the Irp has been completed,
and without that value the IO manager would continue up the call stack to
above the current driver.
--
Don Burn (MVP, Windows DDK)
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
Remove StopSpam to reply
"umesh" <umesh@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:8CE57F52-CDA4-4790-B64A-345BD1C6A382@xxxxxxxxxxxxxxxx
Hi All,
I am little bit curious about following code snippet
1) IoCopyCurrentIrpStackLocationToNext( Irp );
2) IoSetCompletionRoutine( Irp,
Pix_IrpCompletionRoutine,
&event , , ,)
3) status = IoCallDriver( DeviceObject, Irp );
4) if( status == STATUS_PENDING )
{
....
}
5) IoCompleteRequest( Irp, IO_NO_INCREMENT );
6) return status;
Pix_IrpCompletionRoutine
{
return STATUS_MORE_PROCESSING_REQUIRED;
}
As per my inderstanding IOCallDriver will pass the IRP to next lower
driver.
Then this next lower driver will process the IRP and after fininshing it's
work it call the IOCompletion Routine function i.e.
Pix_IrpCompletionRoutine.
This Pix_IrpCompletionRoutine function is returning
STATUS_MORE_PROCESSING_REQUIRED.
I just want to know when" if( status == STATUS_PENDING ) " will come into
question. It will execute immediately after IOCallDriver or it will wait
till
IOCallDriver finishes its job. Whats the use of
STATUS_MORE_PROCESSING_REQUIRED value here.
I appreciate if anyone can throw light in this one.
Regards
wanni
- Follow-Ups:
- Re: IOSetCompletion Routine?
- From: Maxim S. Shatskih
- Re: IOSetCompletion Routine?
- From: Don Burn
- Re: IOSetCompletion Routine?
- References:
- IOSetCompletion Routine?
- From: umesh
- Re: IOSetCompletion Routine?
- From: Don Burn
- IOSetCompletion Routine?
- Prev by Date: Re: IOSetCompletion Routine?
- Next by Date: Re: IOSetCompletion Routine?
- Previous by thread: Re: IOSetCompletion Routine?
- Next by thread: Re: IOSetCompletion Routine?
- Index(es):
Relevant Pages
|