waiting for completion

I need a dispatch routine to create an irp, forward
it, wait for it to complete and then continue.

Can I use IoBuildSynchronousFsdRequest to create an
irp that is forwarded to class driver rather then an
fsd?

Or am i forced to use ioallocateirp and then signal an
event in a completion routine?

Rajeev


Everything you always wanted to know about cars and bikes,now
at: http://in.autos.yahoo.com/cricket/tracker.html

Why not use the IRP you received in your dispatch routine rather than
allocating a new one. As long as your completion routine (the one which
signals the event) returns STATUS_MORE_PROCESING_REQUIRED you can
continue to use the IRP when your dispatching thread is woken up.

-----Original Message-----
From: Rajeev Rao [mailto:xxxxx@yahoo.co.in]
Sent: Sunday, May 12, 2002 11:52 PM
To: NT Developers Interest List
Subject: [ntdev] waiting for completion

I need a dispatch routine to create an irp, forward
it, wait for it to complete and then continue.

Can I use IoBuildSynchronousFsdRequest to create an
irp that is forwarded to class driver rather then an
fsd?

Or am i forced to use ioallocateirp and then signal an
event in a completion routine?

Rajeev


Everything you always wanted to know about cars and bikes,now
at: http://in.autos.yahoo.com/cricket/tracker.html


You are currently subscribed to ntdev as: xxxxx@microsoft.com To
unsubscribe send a blank email to %%email.unsub%%

— Peter Wieland
wrote: > Why not use the IRP you received in your
dispatch
> routine rather than
> allocating a new one. As long as your completion
> routine (the one which
> signals the event) returns
> STATUS_MORE_PROCESING_REQUIRED you can
> continue to use the IRP when your dispatching thread
> is woken up.

Its difficult to explain, but my problem involves
three irps. Call them A, B, C
C is the irp I receive from a higher layer.
C has to wait for both A and B to be completed before
it can be forwarded to the lower layer.

A and C have the same data, but are sent to two
different devices with two different offsets. But I
can reuse the irp in the manner you have stated.

However since B has a totally different data. Note: A
& B are sent to the same device.

I thought of a slightly different way of solving the
problem, but my driver crashed with a paging error.

On receiving C. I create and send A. In A’s completion
Routine I create and send B (using IoCalldriver) and
finally in B’s completion routine I send C to its
intended destination. However the whole thing crashes
as soon as control is transfered to the A’s completion
routine, due to a pagefault. I’m still debugging. I’ll
be glad for more suggestions.

Rajeev

________________________________________________________________________
Everything you always wanted to know about cars and bikes,now
at: http://in.autos.yahoo.com/cricket/tracker.html

Check your IRQL. You are probably being called at DISPATCH level. If so,
you will need to queue it to a worker thread.

Pete

Peter Scott
xxxxx@KernelDrivers.com
http://www.KernelDrivers.com

>-----Original Message-----
>From: xxxxx@lists.osr.com [mailto:bounce-ntdev-
>xxxxx@lists.osr.com] On Behalf Of Rajeev Rao
>Sent: Monday, May 13, 2002 10:22 AM
>To: NT Developers Interest List
>Subject: [ntdev] RE: waiting for completion
>
> — Peter Wieland
>>wrote: > Why not use the IRP you received in your
>>dispatch
>>> routine rather than
>>> allocating a new one. As long as your completion
>>> routine (the one which
>>> signals the event) returns
>>> STATUS_MORE_PROCESING_REQUIRED you can
>>> continue to use the IRP when your dispatching thread
>>> is woken up.
>>
>>Its difficult to explain, but my problem involves
>>three irps. Call them A, B, C
>>C is the irp I receive from a higher layer.
>>C has to wait for both A and B to be completed before
>>it can be forwarded to the lower layer.
>>
>>A and C have the same data, but are sent to two
>>different devices with two different offsets. But I
>>can reuse the irp in the manner you have stated.
>>
>>However since B has a totally different data. Note: A
>>& B are sent to the same device.
>>
>>I thought of a slightly different way of solving the
>>problem, but my driver crashed with a paging error.
>>
>>On receiving C. I create and send A. In A’s completion
>>Routine I create and send B (using IoCalldriver) and
>>finally in B’s completion routine I send C to its
>>intended destination. However the whole thing crashes
>>as soon as control is transfered to the A’s completion
>>routine, due to a pagefault. I’m still debugging. I’ll
>>be glad for more suggestions.
>>
>>Rajeev
>>
>>
>> ____________________________________________________________________

>>Everything you always wanted to know about cars and bikes,now
>> at: http://in.autos.yahoo.com/cricket/tracker.html
>>
>>—
>>You are currently subscribed to ntdev as: xxxxx@KernelDrivers.com
>>To unsubscribe send a blank email to %%email.unsub%%