Soft reboot API for WinCE

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
 
C

Christian Resma Helle

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
 
P

Paul G. Tobey [eMVP]

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top