Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results
The free OSR Learning Library has more than 50 articles on a wide variety of topics about writing and debugging device drivers and Minifilters. From introductory level to advanced. All the articles have been recently reviewed and updated, and are written using the clear and definitive style you've come to expect from OSR over the years.
Check out The OSR Learning Library at: https://www.osr.com/osr-learning-library/
I have two IOCTL which are handled by same kernel mode driver.
In 1st IOCTL, I forward the request to manual queue using WdfRequestForwardToIoQueue(). The return status of this function is a success.
in 2nd IOCTL, I am trying to find the request in the manual queue using WdfIoQueueFindRequest(). However, its returning the status as STATUS_NO_MORE_ENTRIES.
I am not quite sure what causes the STATUS_NO_MORE_ENTRIES error since the request looks to be forwarded successfully to manual queue by 1st IOCTL
Upcoming OSR Seminars | ||
---|---|---|
OSR has suspended in-person seminars due to the Covid-19 outbreak. But, don't miss your training! Attend via the internet instead! | ||
Kernel Debugging | 30 January 2023 | Live, Online |
Developing Minifilters | 20 March 2023 | Live, Online |
Internals & Software Drivers | 17 April 2023 | Live, Online |
Writing WDF Drivers | 22 May 2023 | Live, Online |
Comments
Perhaps you should show us some code. This s a very common pattern.
Tim Roberts, [email protected]
Providenza & Boekelheide, Inc.
Basically, in my first try I tried to forward the request to a manual queue and find the request in the manual queue as part of same IOCTL(This was just for testing):
I am trying to forward request to queue and find the request in queue as part of same IOCTL:
Your "ASSERT" is incorrect. The request that you get from WdfIoQueueFindRequest is a "fake" shadow request that refers to the real request. You will not get the same request handle when you do WdfdIoQueueRetrieveFoundRequest. If you call WdfIoQueueGetState, does it show there are requests in the queue?
Tim Roberts, [email protected]
Providenza & Boekelheide, Inc.
I used the following piece of code to achieve what you are trying to say(right after forwarding request to the Queue):
It does say that the num_request = 1 after function execution, state variable is set to 0x0B.
Also, looks like when I use WdfIoQueueRetrieveNextRequest() instead of WdfIoQueueFindRequest(), I see that the code returns success code.
Is there any limitation for use of WdfIoQueueFindRequest() that causes it to return error status?
Theoretically, your code should work. After all, you copied it word-for-word from the WdfIoQueueFindRequest documentation page, after all. However, I have had better luck with WdfIoQueueRetrieveNextRequest.
Tim Roberts, [email protected]
Providenza & Boekelheide, Inc.