Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cold Boot Windows Mobile 6.5 Device Programmatically Using C#

I've seen a lot of code regarding the IOCTL and I tried using some code that shows how to cold boot a Windows Mobile device by setting SetCleanRebootFlag() and int IOCTL_HAL_REBOOT = 0x101003C; but it doesn't reset the boot count under HKLM\Comm\BootCount and that's the quick way for me to check cold boot (should be reset to '0'). Can someone show me code for a 'cold boot'? I'm referencing code I've used from here: Reboot Windows Mobile 6.x device programmatically using C#

Regards, Scott

like image 321
spickles Avatar asked Feb 16 '26 23:02

spickles


1 Answers

That counter isn't reset to zero with devices that have a persistent registry (most Windows Mobile devices since WM5 have this). Does your device have one?

Your CPU may have a status register indicating the cause of the last reboot. You can try checking that. Alternately, your OEM may have provided an IOCTL for the same purpose.

A clean registry requires a "clean boot". There is no standard way of performing a clean boot on windows mobile devices. You will have to refer to your OEM provided documentation for this.

If you just want to reboot the device, I use SetSystemPowerState:

::SetSystemPowerState( NULL, POWER_STATE_RESET, POWER_FORCE );

-PaulH

like image 89
PaulH Avatar answered Feb 18 '26 12:02

PaulH



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!