Posts tagged ‘wince-warm-boot’

Using SetSystemPowerState to reset a Windows Mobile device

recently I read an article about using SetSystemPowerState instead of KernelIOControl:

SetSystemPowerState(NULL,POWER_STATE_RESET,0);

Using KernelIOControl to reset a device (warm or cold boot) may not flush buffers to storage and so the article shows how to use SetSystemPowerState to reboot a Windows Mobile device.

I recommend all to use SetSystemPowerState to reset a WM device instead of using KerneIOControl to avoid missing data. SetSystemPowerState with argument POWER_STATE_RESET will first flush disk buffers and then perform the reset. This will be much safer than doing it the ‘hard way’ with KernelIOControl.

see also here and at MSDN and this great article at CodeProject