ReactOS 0.4.15-dev-7988-g06a3508
shutdown.c File Reference
#include <ntoskrnl.h>
#include <debug.h>
Include dependency graph for shutdown.c:

Go to the source code of this file.

Macros

#define NDEBUG
 

Functions

VOID NTAPI ExShutdownSystem (VOID)
 
NTSTATUS NTAPI NtShutdownSystem (IN SHUTDOWN_ACTION Action)
 

Macro Definition Documentation

◆ NDEBUG

#define NDEBUG

Definition at line 14 of file shutdown.c.

Function Documentation

◆ ExShutdownSystem()

VOID NTAPI ExShutdownSystem ( VOID  )

Definition at line 21 of file shutdown.c.

22{
23 /* Dereference the hard-error port and process objects */
25 {
28 }
30 {
33 }
34}
#define NULL
Definition: types.h:112
PVOID ExpDefaultErrorPort
Definition: harderr.c:18
PEPROCESS ExpDefaultErrorPortProcess
Definition: harderr.c:19
#define ObDereferenceObject
Definition: obfuncs.h:203

Referenced by PopGracefulShutdown().

◆ NtShutdownSystem()

NTSTATUS NTAPI NtShutdownSystem ( IN SHUTDOWN_ACTION  Action)

Definition at line 43 of file shutdown.c.

44{
45 POWER_ACTION PowerAction;
46
47 /* Convert to power action */
49 {
50 PowerAction = PowerActionShutdown;
51 }
52 else if (Action == ShutdownReboot)
53 {
54 PowerAction = PowerActionShutdownReset;
55 }
56 else if (Action == ShutdownPowerOff)
57 {
58 PowerAction = PowerActionShutdownOff;
59 }
60 else
61 {
63 }
64
65 /* Now call the power manager */
66 DPRINT("Setting state to: %lx\n", PowerAction);
67 return NtSetSystemPowerState(PowerAction,
72}
@ ShutdownReboot
Definition: extypes.h:177
@ ShutdownPowerOff
Definition: extypes.h:178
@ ShutdownNoReboot
Definition: extypes.h:176
NTSTATUS NTAPI NtSetSystemPowerState(IN POWER_ACTION SystemAction, IN SYSTEM_POWER_STATE MinSystemState, IN ULONG Flags)
Definition: power.c:1007
@ PowerSystemSleeping3
Definition: ntpoapi.h:39
#define POWER_ACTION_OVERRIDE_APPS
Definition: ntpoapi.h:416
POWER_ACTION
Definition: ntpoapi.h:122
@ PowerActionShutdownOff
Definition: ntpoapi.h:129
@ PowerActionShutdown
Definition: ntpoapi.h:127
@ PowerActionShutdownReset
Definition: ntpoapi.h:128
#define POWER_ACTION_DISABLE_WAKES
Definition: ntpoapi.h:419
#define POWER_ACTION_CRITICAL
Definition: ntpoapi.h:420
#define DPRINT
Definition: sndvol32.h:71
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135
_In_ WDFIOTARGET _In_ _Strict_type_match_ WDF_IO_TARGET_SENT_IO_ACTION Action
Definition: wdfiotarget.h:510

Referenced by DoRebootCommand(), HandleShutdown(), RunUSetup(), SecurityDialogProc(), ShutDown_PowerOff(), and ShutDown_Reboot().