public void SetSuspendState(bool hibernate, bool force, bool wakeupEventsDisabled) { var result = PowerManagementInteroperation.SetSuspendState(hibernate, force, wakeupEventsDisabled); if (!result) { throw new Win32Exception(); } }