Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenshutdown.c
Go to the documentation of this file.
00001 /* 00002 * COPYRIGHT: See COPYING in the top level directory 00003 * PROJECT: ReactOS kernel 00004 * FILE: ntoskrnl/ex/power.c 00005 * PURPOSE: Power managment 00006 * 00007 * PROGRAMMERS: David Welch (welch@cwcom.net) 00008 */ 00009 00010 /* INCLUDES *****************************************************************/ 00011 00012 #include <ntoskrnl.h> 00013 #include <debug.h> 00014 00015 /* FUNCTIONS *****************************************************************/ 00016 00017 /* 00018 * @implemented 00019 */ 00020 NTSTATUS 00021 NTAPI 00022 NtShutdownSystem(IN SHUTDOWN_ACTION Action) 00023 { 00024 POWER_ACTION PowerAction; 00025 00026 /* Convert to power action */ 00027 if (Action == ShutdownNoReboot) 00028 { 00029 PowerAction = PowerActionShutdown; 00030 } 00031 else if (Action == ShutdownReboot) 00032 { 00033 PowerAction = PowerActionShutdownReset; 00034 } 00035 else if (Action == ShutdownPowerOff) 00036 { 00037 PowerAction = PowerActionShutdownOff; 00038 } 00039 else 00040 { 00041 return STATUS_INVALID_PARAMETER; 00042 } 00043 00044 /* Now call the power manager */ 00045 DPRINT1("Setting state to: %lx\n", PowerAction); 00046 return NtSetSystemPowerState(PowerAction, 00047 PowerSystemSleeping3, 00048 POWER_ACTION_OVERRIDE_APPS | 00049 POWER_ACTION_DISABLE_WAKES | 00050 POWER_ACTION_CRITICAL); 00051 } 00052 00053 /* EOF */ Generated on Sun May 27 2012 04:17:43 for ReactOS by
1.7.6.1
|