Re: Problem with IoCompleteRequest() call

My scenerio:

I Have function ReadData(), and WriteData() in my driver.
From my Dispatch routine I am calling WriteData(). (I must complete
Write first…).

In the completion routine of WriteData(), I am calling ReadData() and
returning STATUS_MORE_PROCESSING_REQUIRED.

In ReadData(), I am calling again completion routine (Same routine of
WriteData()).

In ReadData() Completion routine I am looking for any remaining data
to be processed, If exists, I am again calling WriteData() and
returning STATUS_MORE_PROCESSING_REQUIRED.

If the data to be processed does not exists, then I am returning
STATUS_SUCCESS and marking IRP as completion using
IoCompleteRequest().

Problem:

If I am marking IRP as completion using IoCompleteRequest(), my
driver is crashing (BSOD). If I am not completing my IRP My driver is
working fine.

Can any of U explain me why this strange behavior is occurring?

Thanks and Regards,
Ramya

When you return STATUS_MORE_PROCESSING_REQUIRED in your completion
routine, you are telling the i/o manager that you will complete the
request on your own. When you return anything other then
STATUS_MORE_PROCESSING_REQUIRED (something like STATUS_SUCESS), the i/o
manager will complete the request for you. Think of the processing of
this NTSTATUS value as a BOOLEAN in this particular instance.

Note that you still have to set Irp->IoStatus.Status to the status you
want the irp to complete with. The NTSTATUS value returned by your
completion routine is not placed into the irp.

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Ramya Desai
Sent: Tuesday, April 05, 2005 10:20 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] Problem with IoCompleteRequest() call

My scenerio:

I Have function ReadData(), and WriteData() in my driver.
From my Dispatch routine I am calling WriteData(). (I must complete
Write first…).

In the completion routine of WriteData(), I am calling ReadData() and
returning STATUS_MORE_PROCESSING_REQUIRED.

In ReadData(), I am calling again completion routine (Same routine of
WriteData()).

In ReadData() Completion routine I am looking for any remaining data
to be processed, If exists, I am again calling WriteData() and
returning STATUS_MORE_PROCESSING_REQUIRED.

If the data to be processed does not exists, then I am returning
STATUS_SUCCESS and marking IRP as completion using
IoCompleteRequest().

Problem:

If I am marking IRP as completion using IoCompleteRequest(), my
driver is crashing (BSOD). If I am not completing my IRP My driver is
working fine.

Can any of U explain me why this strange behavior is occurring?

Thanks and Regards,
Ramya


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

Dear D,
Here I am passing the code snippet that I have in Completion routine.
This code executes when no data is to be processing.

if(!ioContext->bytesRemaining)
{
Irp->IoStatus.Status = ntStatus;
Irp->IoStatus.Information = ioContext->Numxfer;
BulkUsb_DbgPrint(3, (“IOCTL_RWCompletion with STATUS_SUCCESS\n”));
return STATUS_SUCCESS;
}

*********************************************************************************************
When you return STATUS_MORE_PROCESSING_REQUIRED in your completion
routine, you are telling the i/o manager that you will complete the
request on your own. When you return anything other then
STATUS_MORE_PROCESSING_REQUIRED (something like STATUS_SUCESS), the i/o
manager will complete the request for you. Think of the processing of
this NTSTATUS value as a BOOLEAN in this particular instance.

Note that you still have to set Irp->IoStatus.Status to the status you
want the irp to complete with. The NTSTATUS value returned by your
completion routine is not placed into the irp.

That will complete the request with ntStatus (whatever value that is).
Looks fine to me given just the context you have given.

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Ramya Desai
Sent: Tuesday, April 05, 2005 10:48 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] Problem with IoCompleteRequest() call

Dear D,
Here I am passing the code snippet that I have in Completion routine.
This code executes when no data is to be processing.

if(!ioContext->bytesRemaining)
{
Irp->IoStatus.Status = ntStatus;
Irp->IoStatus.Information = ioContext->Numxfer;
BulkUsb_DbgPrint(3, (“IOCTL_RWCompletion with STATUS_SUCCESS\n”));
return STATUS_SUCCESS;
}

************************************************************************
*********************
When you return STATUS_MORE_PROCESSING_REQUIRED in your completion
routine, you are telling the i/o manager that you will complete the
request on your own. When you return anything other then
STATUS_MORE_PROCESSING_REQUIRED (something like STATUS_SUCESS), the i/o
manager will complete the request for you. Think of the processing of
this NTSTATUS value as a BOOLEAN in this particular instance.

Note that you still have to set Irp->IoStatus.Status to the status you
want the irp to complete with. The NTSTATUS value returned by your
completion routine is not placed into the irp.


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

Dear Doron,

In the dispatch routing begining I am marking my IRP as pending.
Is it not compulsory to add IoCompleteRequest() after completion of processing.
Is this Irp->IoStatus.Status = ntStatus statement enough ?

But I am giving IoCompleteRequest() after assigning status. Then my
driver is crashing. This code looks like following.

if(!ioContext->bytesRemaining)
{
Irp->IoStatus.Status = ntStatus;
Irp->IoStatus.Information = ioContext->Numxfer;
IoCompleteRequest(Irp, IO_NO_INCREMENT);
return STATUS_SUCCESS; //Newly Added.
}

Regards,
Ramya.

On Apr 6, 2005 11:41 AM, Doron Holan wrote:
> That will complete the request with ntStatus (whatever value that is).
> Looks fine to me given just the context you have given.
>
> d
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Ramya Desai
> Sent: Tuesday, April 05, 2005 10:48 PM
> To: Windows System Software Devs Interest List
> Subject: Re:[ntdev] Problem with IoCompleteRequest() call
>
> Dear D,
> Here I am passing the code snippet that I have in Completion routine.
> This code executes when no data is to be processing.
>
> if(!ioContext->bytesRemaining)
> {
> Irp->IoStatus.Status = ntStatus;
> Irp->IoStatus.Information = ioContext->Numxfer;
> BulkUsb_DbgPrint(3, (“IOCTL_RWCompletion with STATUS_SUCCESS\n”));
> return STATUS_SUCCESS;
> }
>
> ***************************************************
>

> When you return STATUS_MORE_PROCESSING_REQUIRED in your completion
> routine, you are telling the i/o manager that you will complete the
> request on your own. When you return anything other then
> STATUS_MORE_PROCESSING_REQUIRED (something like STATUS_SUCESS), the i/o
> manager will complete the request for you. Think of the processing of
> this NTSTATUS value as a BOOLEAN in this particular instance.
>
> Note that you still have to set Irp->IoStatus.Status to the status you
> want the irp to complete with. The NTSTATUS value returned by your
> completion routine is not placed into the irp.
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
> —
> Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: unknown lmsubst tag argument: ‘’
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>

Ramya Desai wrote:

Dear Doron,

In the dispatch routing begining I am marking my IRP as pending.
Is it not compulsory to add IoCompleteRequest() after completion of processing.
Is this Irp->IoStatus.Status = ntStatus statement enough ?

But I am giving IoCompleteRequest() after assigning status. Then my
driver is crashing. This code looks like following.

if(!ioContext->bytesRemaining)
{
Irp->IoStatus.Status = ntStatus;
Irp->IoStatus.Information = ioContext->Numxfer;
IoCompleteRequest(Irp, IO_NO_INCREMENT);

This is what we were talking about. Your completion routine is called in
the process of completing the IRP.
The lower driver started the process by calling IoCompleteRequest(). You
should return STATUS_SUCCESS
and remove your call to IoCompleteRequest().
It’s funny that you already posted a good sample and that was confirmed
by Doron.

return STATUS_SUCCESS; //Newly Added.
}

Regards,
Ramya.

On Apr 6, 2005 11:41 AM, Doron Holan wrote:
>
>
>>That will complete the request with ntStatus (whatever value that is).
>>Looks fine to me given just the context you have given.
>>
>>d
>>
>>-----Original Message-----
>>From: xxxxx@lists.osr.com
>>[mailto:xxxxx@lists.osr.com] On Behalf Of Ramya Desai
>>Sent: Tuesday, April 05, 2005 10:48 PM
>>To: Windows System Software Devs Interest List
>>Subject: Re:[ntdev] Problem with IoCompleteRequest() call
>>
>>Dear D,
>>Here I am passing the code snippet that I have in Completion routine.
>>This code executes when no data is to be processing.
>>
>>if(!ioContext->bytesRemaining)
>>{
>>Irp->IoStatus.Status = ntStatus;
>>Irp->IoStatus.Information = ioContext->Numxfer;
>>BulkUsb_DbgPrint(3, (“IOCTL_RWCompletion with STATUS_SUCCESS\n”));
>>return STATUS_SUCCESS;
>>}
>>
>> ***************************************************
>>

>>When you return STATUS_MORE_PROCESSING_REQUIRED in your completion
>>routine, you are telling the i/o manager that you will complete the
>>request on your own. When you return anything other then
>>STATUS_MORE_PROCESSING_REQUIRED (something like STATUS_SUCESS), the i/o
>>manager will complete the request for you. Think of the processing of
>>this NTSTATUS value as a BOOLEAN in this particular instance.
>>
>>Note that you still have to set Irp->IoStatus.Status to the status you
>>want the irp to complete with. The NTSTATUS value returned by your
>>completion routine is not placed into the irp.
>>
>>—
>>Questions? First check the Kernel Driver FAQ at
>>http://www.osronline.com/article.cfm?id=256
>>
>>You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
>>To unsubscribe send a blank email to xxxxx@lists.osr.com
>>
>>—
>>Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256
>>
>>You are currently subscribed to ntdev as: unknown lmsubst tag argument: ‘’
>>To unsubscribe send a blank email to xxxxx@lists.osr.com
>>
>>
>>
>
>—
>Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256
>
>You are currently subscribed to ntdev as: xxxxx@bitdefender.com
>To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
>
>


Ignorance more frequently begets confidence than does knowledge.
— Charles Darwin


This message was scanned for spam and viruses by BitDefender.
For more information please visit http://linux.bitdefender.com/

I am not sure if I can be more clear. This sequence:

Irp->IoStatus.Status = ntStatus;
return STATUS_CONTINUE_COMPLETION;

Is enough.

Think of it this way. When you send the irp down the stack and the
lower driver completes the request, it completes back to the i/o
manager. The i/o manager then walks up each stack location, calling the
completion routine. The i/o manager will stop walking up the stack
locations under the following conditions

  1. there are no more stack locations. At this point, the i/o manager
    returns processing to the initiator of the IRP
  2. the current stack location’s completion routin returns
    STATUS_MORE_PROCESSING_REQUIRED. At this point, the i/o manager stops
    processing the IRP entirely. To further complete the request,
    IoCompleteRequest must be called.

So, taking this into account, you can do one of 2 things to complete the
request back up to the caller

  1. (like I indicated before)
    Irp->IoStatus.Status = ntStatus;
    return STATUS_CONTINUE_COMPLETION;

Irp->IoStatus.Status = ntStatus;
IoCompleteRequest(Irp, IO_NO_INCREMENT);
return STATUS_MORE_PROCESSING_REQUIRED;

both of these do exactly the same thing

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Ramya Desai
Sent: Tuesday, April 05, 2005 11:43 PM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] Problem with IoCompleteRequest() call

Dear Doron,

In the dispatch routing begining I am marking my IRP as pending.
Is it not compulsory to add IoCompleteRequest() after completion of
processing.
Is this Irp->IoStatus.Status = ntStatus statement enough ?

But I am giving IoCompleteRequest() after assigning status. Then my
driver is crashing. This code looks like following.

if(!ioContext->bytesRemaining)
{
Irp->IoStatus.Status = ntStatus;
Irp->IoStatus.Information = ioContext->Numxfer;
IoCompleteRequest(Irp, IO_NO_INCREMENT);
return STATUS_SUCCESS; //Newly Added.
}

Regards,
Ramya.

On Apr 6, 2005 11:41 AM, Doron Holan
wrote:
> That will complete the request with ntStatus (whatever value that is).
> Looks fine to me given just the context you have given.
>
> d
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Ramya Desai
> Sent: Tuesday, April 05, 2005 10:48 PM
> To: Windows System Software Devs Interest List
> Subject: Re:[ntdev] Problem with IoCompleteRequest() call
>
> Dear D,
> Here I am passing the code snippet that I have in Completion routine.
> This code executes when no data is to be processing.
>
> if(!ioContext->bytesRemaining)
> {
> Irp->IoStatus.Status = ntStatus;
> Irp->IoStatus.Information = ioContext->Numxfer;
> BulkUsb_DbgPrint(3, (“IOCTL_RWCompletion with STATUS_SUCCESS\n”));
> return STATUS_SUCCESS;
> }
>
>
***************************************************
>

> When you return STATUS_MORE_PROCESSING_REQUIRED in your completion
> routine, you are telling the i/o manager that you will complete the
> request on your own. When you return anything other then
> STATUS_MORE_PROCESSING_REQUIRED (something like STATUS_SUCESS), the
i/o
> manager will complete the request for you. Think of the processing of
> this NTSTATUS value as a BOOLEAN in this particular instance.
>
> Note that you still have to set Irp->IoStatus.Status to the status you
> want the irp to complete with. The NTSTATUS value returned by your
> completion routine is not placed into the irp.
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: unknown lmsubst tag
argument: ‘’
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

ThanQ all, for giving me good replys.

Regards,
Ramya

On Apr 6, 2005 12:34 PM, Doron Holan wrote:
> I am not sure if I can be more clear. This sequence:
>
> Irp->IoStatus.Status = ntStatus;
> return STATUS_CONTINUE_COMPLETION;
>
> Is enough.
>
> Think of it this way. When you send the irp down the stack and the
> lower driver completes the request, it completes back to the i/o
> manager. The i/o manager then walks up each stack location, calling the
> completion routine. The i/o manager will stop walking up the stack
> locations under the following conditions
> 1) there are no more stack locations. At this point, the i/o manager
> returns processing to the initiator of the IRP
> 2) the current stack location’s completion routin returns
> STATUS_MORE_PROCESSING_REQUIRED. At this point, the i/o manager stops
> processing the IRP entirely. To further complete the request,
> IoCompleteRequest must be called.
>
> So, taking this into account, you can do one of 2 things to complete the
> request back up to the caller
>
> 1) (like I indicated before)
> Irp->IoStatus.Status = ntStatus;
> return STATUS_CONTINUE_COMPLETION;
>
> 2)
> Irp->IoStatus.Status = ntStatus;
> IoCompleteRequest(Irp, IO_NO_INCREMENT);
> return STATUS_MORE_PROCESSING_REQUIRED;
>
> both of these do exactly the same thing
>
> d
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Ramya Desai
> Sent: Tuesday, April 05, 2005 11:43 PM
> To: Windows System Software Devs Interest List
> Subject: Re: [ntdev] Problem with IoCompleteRequest() call
>
> Dear Doron,
>
> In the dispatch routing begining I am marking my IRP as pending.
> Is it not compulsory to add IoCompleteRequest() after completion of
> processing.
> Is this Irp->IoStatus.Status = ntStatus statement enough ?
>
> But I am giving IoCompleteRequest() after assigning status. Then my
> driver is crashing. This code looks like following.
>
> if(!ioContext->bytesRemaining)
> {
> Irp->IoStatus.Status = ntStatus;
> Irp->IoStatus.Information = ioContext->Numxfer;
> IoCompleteRequest(Irp, IO_NO_INCREMENT);
> return STATUS_SUCCESS; //Newly Added.
> }
>
> Regards,
> Ramya.
>
> On Apr 6, 2005 11:41 AM, Doron Holan
> wrote:
> > That will complete the request with ntStatus (whatever value that is).
> > Looks fine to me given just the context you have given.
> >
> > d
> >
> > -----Original Message-----
> > From: xxxxx@lists.osr.com
> > [mailto:xxxxx@lists.osr.com] On Behalf Of Ramya Desai
> > Sent: Tuesday, April 05, 2005 10:48 PM
> > To: Windows System Software Devs Interest List
> > Subject: Re:[ntdev] Problem with IoCompleteRequest() call
> >
> > Dear D,
> > Here I am passing the code snippet that I have in Completion routine.
> > This code executes when no data is to be processing.
> >
> > if(!ioContext->bytesRemaining)
> > {
> > Irp->IoStatus.Status = ntStatus;
> > Irp->IoStatus.Information = ioContext->Numxfer;
> > BulkUsb_DbgPrint(3, (“IOCTL_RWCompletion with STATUS_SUCCESS\n”));
> > return STATUS_SUCCESS;
> > }
> >
> >
> ***************************************************
> >

> > When you return STATUS_MORE_PROCESSING_REQUIRED in your completion
> > routine, you are telling the i/o manager that you will complete the
> > request on your own. When you return anything other then
> > STATUS_MORE_PROCESSING_REQUIRED (something like STATUS_SUCESS), the
> i/o
> > manager will complete the request for you. Think of the processing of
> > this NTSTATUS value as a BOOLEAN in this particular instance.
> >
> > Note that you still have to set Irp->IoStatus.Status to the status you
> > want the irp to complete with. The NTSTATUS value returned by your
> > completion routine is not placed into the irp.
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> > http://www.osronline.com/article.cfm?id=256
> >
> > You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
> > To unsubscribe send a blank email to xxxxx@lists.osr.com
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
> >
> > You are currently subscribed to ntdev as: unknown lmsubst tag
> argument: ‘’
> > To unsubscribe send a blank email to xxxxx@lists.osr.com
> >
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
> —
> Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: unknown lmsubst tag argument: ‘’
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>

> If the data to be processed does not exists, then I am returning

STATUS_SUCCESS and marking IRP as completion using
IoCompleteRequest().

Returning STATUS_SUCCESS from the completion is the same as calling
IoCompleteRequest from it. Effectively, you complete the IRP twice.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

There is one little difference most drivers - especially filters on the
critical i/o path for storage stacks - forget. The scheduling boost you
supply to IoCompleteRequest should be chosen quite carefully.
Unfortunately, there is no way to communicate that from one
IoCompleteRequest() to another today. If you know what you are doing,
and you are in the critical perf path for storage stacks, you should
supply IO_DISK_INCREMENT

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Doron Holan
Sent: Wednesday, April 06, 2005 12:05 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Problem with IoCompleteRequest() call

I am not sure if I can be more clear. This sequence:

Irp->IoStatus.Status = ntStatus;
return STATUS_CONTINUE_COMPLETION;

Is enough.

Think of it this way. When you send the irp down the stack and the
lower driver completes the request, it completes back to the i/o
manager. The i/o manager then walks up each stack location, calling the
completion routine. The i/o manager will stop walking up the stack
locations under the following conditions

  1. there are no more stack locations. At this point, the i/o manager
    returns processing to the initiator of the IRP
  2. the current stack location’s completion routin returns
    STATUS_MORE_PROCESSING_REQUIRED. At this point, the i/o manager stops
    processing the IRP entirely. To further complete the request,
    IoCompleteRequest must be called.

So, taking this into account, you can do one of 2 things to complete the
request back up to the caller

  1. (like I indicated before)
    Irp->IoStatus.Status = ntStatus;
    return STATUS_CONTINUE_COMPLETION;

Irp->IoStatus.Status = ntStatus;
IoCompleteRequest(Irp, IO_NO_INCREMENT); return
STATUS_MORE_PROCESSING_REQUIRED;

both of these do exactly the same thing

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Ramya Desai
Sent: Tuesday, April 05, 2005 11:43 PM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] Problem with IoCompleteRequest() call

Dear Doron,

In the dispatch routing begining I am marking my IRP as pending.
Is it not compulsory to add IoCompleteRequest() after completion of
processing.
Is this Irp->IoStatus.Status = ntStatus statement enough ?

But I am giving IoCompleteRequest() after assigning status. Then my
driver is crashing. This code looks like following.

if(!ioContext->bytesRemaining)
{
Irp->IoStatus.Status = ntStatus;
Irp->IoStatus.Information = ioContext->Numxfer;
IoCompleteRequest(Irp, IO_NO_INCREMENT); return STATUS_SUCCESS; //Newly
Added.
}

Regards,
Ramya.

On Apr 6, 2005 11:41 AM, Doron Holan
wrote:
> That will complete the request with ntStatus (whatever value that is).
> Looks fine to me given just the context you have given.
>
> d
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Ramya Desai
> Sent: Tuesday, April 05, 2005 10:48 PM
> To: Windows System Software Devs Interest List
> Subject: Re:[ntdev] Problem with IoCompleteRequest() call
>
> Dear D,
> Here I am passing the code snippet that I have in Completion routine.
> This code executes when no data is to be processing.
>
> if(!ioContext->bytesRemaining)
> {
> Irp->IoStatus.Status = ntStatus;
> Irp->IoStatus.Information = ioContext->Numxfer;
> BulkUsb_DbgPrint(3, (“IOCTL_RWCompletion with STATUS_SUCCESS\n”));
> return STATUS_SUCCESS; }
>
>
***************************************************
>

> When you return STATUS_MORE_PROCESSING_REQUIRED in your completion
> routine, you are telling the i/o manager that you will complete the
> request on your own. When you return anything other then
> STATUS_MORE_PROCESSING_REQUIRED (something like STATUS_SUCESS), the
i/o
> manager will complete the request for you. Think of the processing of

> this NTSTATUS value as a BOOLEAN in this particular instance.
>
> Note that you still have to set Irp->IoStatus.Status to the status you

> want the irp to complete with. The NTSTATUS value returned by your
> completion routine is not placed into the irp.
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com

> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: unknown lmsubst tag
argument: ‘’
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: unknown lmsubst tag argument:
‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com