NTSTATUS
NtSetSystemPowerState(
  IN  POWER_STATE SystemPowerState,
  IN  BOOLEAN NoResumeAlarm,
  IN  BOOLEAN ForcePowerDown
  );

Routine Description:

    This routine is invoked to suspend or hibernate the system. If the system
    can not currently support a suspend or hibernate then an error is returned.
    Suspend/Hibernate support requires that all currently loaded driver have
    power management support.

    This call requires system Shutdown access.

Arguments:

    NoResumeAlarm - If TRUE, then the system will be suspended or hibernated
        without setting any resume alarm. This should be used in the case
        of a critical low battery.

    ForcePowerDown - If FALSE , then the devices are first sent a
        SET_POWER-Query. If all power off queries succeed then devices are
        sent a SET_POWER to suspend or hibernate; otherwise an error is
        returned.

Return Value:

    Success - System was hibernated and has been resumed

    error  -  Neither suspend nor hibernate did not occur due to the reported
              error.