2008-07-05

Warm boot tool for Windows Mobile 6

Currently I'm involved in a project for the Windows Mobile Platform using the EDA MC70 from Symbol. In recent testing of my app, I've needed to warm-boot the device several times. The MC70 has a power and reboot button on it. However, it takes about 10 seconds of pressing this button until the device restarts itself.

To avoid this, I've developed a small application that can warm boot any Mobile 5 and 6 device, as simply as launching a program. The code is easy to understand. Basically it just does a call to the API function ExitWindowsEx. It is described in http://msdn.microsoft.com/en-us/library/ms893047.aspx.

[DllImport("aygshell.dll")]
extern static int ExitWindowsEx(int dwFlags, int dwReason);

function static void Main(string[] args)
{
ExitWindowsEx(2, 0);
}


In order to call the API, we just needed to PInvoke-it! The full program is no longer than the shown in the image bellow...



You can download the tool, named BootMyPhone from here:

Download Full Source
Download Install CAB (for Windows Mobile 5/6)