I am developing a driver and a co installer that adds a property page to the device in device manager.
I encounter the following scenario:
- I modify properties in the co installer properties page and press OK.
- Due to “bad” properties the driver fails to start.
- A “System Settings Change” message box pops up and offers me to restart the computer.
It is acceptable by me that the driver will fail to start. I cannot validate that the properties are OK before the driver tries to restart. But I would like to prevent the pop up box either by changing the co installer or changing the driver code.
In the co installer in response to WM_NOTIFY/PSN_APPLY I modify SP_DEVINSTALL_PARAMS by:
Setting DI_FLAGSEX_PROPCHANGE_PENDING in FlagsEx
Clearing DI_NEEDREBOOT in Flags
The driver is KMDF.
Is it important which error status the EvtDriverDeviceAdd function returns?
Thanks,
Gur