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 a virtual hid driver that would talk to an application. Application would send some command say on or off. My driver needs to remember this state. later, if the application asks what state are you in , with a querydevice, my driver needs to reply with the last state. My driver is a dummy driver, it has no device or anything (forget this part, why the design is in this way, because we have a non hid serial device mapping which we have all is an another software solution).
either ways, my question is how can i persist this state, driver is stateless, in this case, what is the best way to solve the problem of storing this state somewhere.
I was thinking I could have another application that can be connected to the driver as well.
Application 1 sends a ON to the driver.
driver sends an output report to the Application 2.
Application 2 could save it
if Application 1 request for the state
driver now needs to request the state from Application 2 and get another input report
then pass it back to application 1.
but this is complicated and possible deadlocks / a lot of issues in this design..
why we need this -
application may send ON
later application wants to know if device is on or off
it may do a query to know if the device is on or off now
device needs to return the status of on / off.
but the virtual hid driver is dummy, it really doesnt have a device to store on / off or act on this . we just use the on / off signal to manipulate a serial device which works with our application
what is the simplest way to store and save states in the driver, assuming i have no hardware to store the state?
|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!|
|Writing WDF Drivers||7 Dec 2020||LIVE ONLINE|
|Internals & Software Drivers||25 Jan 2021||LIVE ONLINE|
|Developing Minifilters||8 March 2021||LIVE ONLINE|