public void Suspend(bool force = false)
{
// call suspend
if (!CheckEntryPoint("powrprof.dll", "SetSuspendState"))
{
throw new PlatformNotSupportedException("'SetSuspendState' method missing from 'powrprof.dll'!");
}
NativeMethods.SetSuspendState(0, force ? 1 : 0, 0);
}