1. Home
  2. Knowledge Base
  3. C# code to soft reset a Windows Mobile device

C# code to soft reset a Windows Mobile device

Here is the C# code to soft reset a Windows Mobile device (using P/Invoke)

[DllImport("coredll.dll", SetLastError = true)]
static extern int SetSystemPowerState(string psState, int StateFlags, int Options);
const int POWER_FORCE = 4096;
const int POWER_STATE_RESET = 0x00800000;
private void SoftReset()
{
SetSystemPowerState(null, POWER_STATE_RESET, POWER_FORCE);
}

For more details on our products, click here 
If you need further assistance, please submit a ticket here

Was this helpful?
YesNo
Updated on June 2021