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/
For UMDF based Virtual Serial Driver, I am checking to implement read timeouts.
In IO Read routine, if data not available to read, IRPs are put into a manual queue using WdfRequestForwardToIoQueue. Later when data is available from backend IPC, the IRPs are fetched from manual queue and read request completes.
I am trying to check if there any way so that IRPs which are in manual queue shall be completed (may be automatically OR getting some callback notification) after some time (timeout condition).
I saw some option like:
WDF_REQUEST_SEND_OPTIONS syncReqOptions;
WDF_REQUEST_SEND_OPTIONS_INIT(
&syncReqOptions,
0
);
WDF_REQUEST_SEND_OPTIONS_SET_TIMEOUT(
&syncReqOptions,
WDF_REL_TIMEOUT_IN_SEC(10)
);
I tried, but did not get much details on how to use 'syncReqOptions' so that IRPs in manual queue got finished/timeout-out when timeout happens.
Does any one has any idea?
Thanks,
Prasanth
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 | 16-20 October 2023 | Live, Online |
Developing Minifilters | 13-17 November 2023 | Live, Online |
Internals & Software Drivers | 4-8 Dec 2023 | Live, Online |
Writing WDF Drivers | 10-14 July 2023 | Live, Online |
Comments
There’s no automatic way to do this. You need to manage your own timer. You could pass the WDF Request handle to the timer callback in the context.
Peter Viscarola
OSR
@OSRDrivers
Thanks!