Windows Embedded
(1)
SetSystemPowerState
(1)
Willemsen
(1)
Eurotech.it.nospam
(1)
Systemreboots
(1)
WINCEROOT
(1)
IOCTL
(1)
Yor
(1)

SetSystemPowerState (POWER_STATE_RESET)

Asked By John
22-Oct-09 10:37 AM
Hi,

In my CE-app I use SetSystemPowerState(NULL, POWER_STATE_RESET, 0).
This works as expected, but I need to know:
- Will program flow continue after I call this function? Does the function
return on succes?
- Will code in other threads still be executed (which I do not wont, because
a reboot is about to happen)

Thanks,

John Willemsen

'This works as expected' means that you have tried it and your systemreboots?

Luca Calligaris [eMVP] replied to John
22-Oct-09 11:12 AM
'This works as expected' means that you have tried it and your system
reboots? In this case you should be able to tell yourself the answer to yor
questions.
What happens when you call SetSystemPowerState(NULL, POWER_STATE_RESET, 0)
depends on the Power Manger implementation and on the OAL.
The PM handles the call and  in the standard implementation
(%_WINCEROOT%\PUBLIC\COMMON\OAK\DRIVERS\PM\PDD\DEFAULT) it will simply
set a flag to clean the object store at the next boot and will send
IOCTL_HAL_REBOOT to the OAL.

--
Luca Calligaris (MVP-Windows Embedded)
l.calligaris.nospam@eurotech.it.nospam
www.eurotech.it
Post Question To EggHeadCafe