IRP pending query

Hi all,


Do you Yahoo!?
HotJobs - Search new jobs daily now
http://hotjobs.yahoo.com/

Hi all,

In the IRP_MJ_DEVICE_CONTROL DispatchRoutine, if the
IRP has to be pended I am following these steps.
{
IoMarkIrpPending(Irp);
/* storing the IRP in a Queue */
return STATUS_PENDING;
}

I have provided a symboliclink to the device object
created in AddDevice.
The problem is I have a application with two threads.
The application opens the device with the symbolic
link using the call CreateFile(). Both the threads
call the DeviceIoControl() to set/get some
information. If in the driver if one of the IRP’s is
made pending. The driver is not getting the other
thread’s IRP at all untill I complete the pended IRP.

Please help me in this.

Thanks,
Murali


Do you Yahoo!?
HotJobs - Search new jobs daily now
http://hotjobs.yahoo.com/

Murali S wrote:

The problem is I have a application with two threads.
The application opens the device with the symbolic
link using the call CreateFile(). Both the threads
call the DeviceIoControl() to set/get some
information. If in the driver if one of the IRP’s is
made pending. The driver is not getting the other
thread’s IRP at all untill I complete the pended IRP.

If you’re using the same handle in both threads, you would need to open
that handle with FILE_FLAG_OVERLAPPED and use an OVERLAPPED structure in
*all* your calls to DeviceIoControl, ReadFile, and WriteFile. It might
be simpler to have each thread open a separate handle.


Walter Oney, Consulting and Training
Basic and Advanced Driver Programming Seminars
Now teaming with John Hyde for USB Device Engineering Seminars
Check out our schedule at http://www.oneysoft.com

If you are *not* using asynchrounous I/O (without overlapped in your I/O
calls) you cannot use the same handle to make more than 1 call at a time
i.e., you have to wait till the previous one is completed. As Walter
suggestted, use different handles or support pending IRPs using
overlapped I/O.

-----Original Message-----
From: Murali S [mailto:xxxxx@yahoo.com]
Sent: Saturday, November 02, 2002 12:54 PM
To: NT Developers Interest List
Subject: [ntdev] IRP pending query

Hi all,

In the IRP_MJ_DEVICE_CONTROL DispatchRoutine, if the
IRP has to be pended I am following these steps.
{
IoMarkIrpPending(Irp);
/* storing the IRP in a Queue */
return STATUS_PENDING;
}

I have provided a symboliclink to the device object
created in AddDevice.
The problem is I have a application with two threads.
The application opens the device with the symbolic
link using the call CreateFile(). Both the threads
call the DeviceIoControl() to set/get some
information. If in the driver if one of the IRP’s is
made pending. The driver is not getting the other
thread’s IRP at all untill I complete the pended IRP.

Please help me in this.

Thanks,
Murali


Do you Yahoo!?
HotJobs - Search new jobs daily now
http://hotjobs.yahoo.com/


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