The task was to develop a driver which can allow/forbid switching-on the monitor on system events that usually result in such switching:
- switching to a sleep mode on system/screensaver events
- automatic switching-on the monitor on mouse movement or after pressing any key on a keyboard.
We had no experience in writing drivers for devices. For this reason in-depth research had been conducted before the project was started.
It was initially supposed that we just need to write a filter driver. However, as later was discovered, the management of the physical device was required in our case. I.e. we had to write a functional PnP monitor driver and that, in turn, has caused additional tasks – writing the installer and deinstaller for this driver.
Firstly a functional PnP monitor driver was written. For management of allowing/forbidding action a flag is used, which is being set by managing application via DeviceIoControl() function. And blocking /unblocking in this case means whether IRP query to PDO is allowed or not.
As far as we used the functional driver, a necessity to create the program-installer for such driver has appeared. This driver installer must replace the monitor driver (which is actually absent – there is only INF file which creates imitation of the device in Device Manager) so that there was a new driver in the system, but the name of original one continued to be displayed.
At the last step deinstaller which deletes our driver and carries out updating of configuration was written. Replacement of the driver requires updating of device tree, but on desire of our client only a branch of monitor classes had to be updated. This also was implemented.
Absolutely full satisfaction of client requirements in shorter time than it had been supposed. The client continues working with us.
Compuware DriverStudio 3.1, IrpTracker, Windows IFS DDK, MS Visual Studio.