Soft reboot API for WinCE

  • Thread starter Thread starter Krupa
  • Start date Start date
K

Krupa

I am working on a WIn CE 5.0 device and am doing my coding in C# CF
2.0. I was looking for an API that would soft reboot the device. Does
anyone know of any such API?

Thanks,
Krupa
 
You can P/Invoke a method called ExitWindowsEx() from aygshell.dll

it takes the following parameters:
- EWX_POWEROFF - Shuts down the system and turns off the power.
- EWX_REBOOT Shuts down the system and reboots.

Here's a C# snippet for doing a soft reset programmatically:

[DllImport("aygshell.dll")]
private static extern bool ExitWindowsEx(uint uFlags, int dwReserved);

const uint EWX_REBOOT = 0x00000002;
const uint EWX_POWEROFF = 0x00000008;

private void SoftReset()
{
ExitWindowsEx(EWX_REBOOT, 0);
}


Regards,
Christian Resma Helle
http://christian-helle.blogspot.com
 
Note that there is *no* API that every device will have. The other answers
are good ones, but what you really need to do is consult the vendor the
device(s) you care about and see what they say.

Paul T.
 
Back
Top