public Suspend ( bool force = false ) : void | ||
force | bool | Inform system to force operation. |
return | void |
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);
}