I have an array in my kernel mode driver. Is it possible for the driver to save the array data and on load restore the same?
Asked
Active
Viewed 368 times
1 Answers
0
Assuming your array is not incredibly large you can use the registry to store this type of information.
You can set your driver to open a specific registry location relative to your driver instance. If it's missing your driver should contain a default value (you can also set your INF file to put this value in the registry on install). Then, as your data changes and your device unloads rewrite the data to the registry to be looked up the next time your device loads.

Preston
- 2,543
- 1
- 17
- 26
-
When I used perform registry read operations,after many reads,I get the BSOD. So what should I take into consideration on registry operations? – Aster Veigas Sep 20 '13 at 03:50
-
What was the reason for the BSOD? – Preston Sep 20 '13 at 20:09
-
On a key press, I was performing a reg read and close the reg. – Aster Veigas Sep 21 '13 at 06:41
-
1Right, but there will be a reason for the BSOD - such as divide by zero in kernel mode. Just reading the registry from your driver shouldn't cause a BSOD unless you are doing something wrong, like supplying a bad buffer, etc. – Preston Sep 22 '13 at 18:59