I'm working on a scenario where I need to intercept the sleep signal on a BitsyXb system (though the question would apply to all systems). In order to enable the eature, I realize that I need to set the following reg key:
However it appears that this is read only when the driver loads, so if I change the value I have to restart the system to get it to take effect. Does Eurotech provide any API to allow me to tell the power driver to re-read these values? I considered calling DeactivateDevice on the driver handle in the registry (HKLM\Drivers\Active\) but that hack has been closed in CE 6, so it's not very maintainable. If you don't have such a feature, could I put in the request that it be added in future builds?
The power IOCTL looks quite promising. How does it interoperate with the registry setting (i.e. does it modify the registry entry for me to keep the behavior in sync, or do I need to do that piece)?
The registry keys are read at initialization phase, so you can put the default settings there, while you can use the IOCTL's to modify the settings at runtime. The IOCTL's will not modify the keys in the registry.