ReactOS  0.4.14-dev-376-gaedba84
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 }
PEPROCESS ExpDefaultErrorPortProcess
Definition: harderr.c:21
VOID NTAPI ObDereferenceObject(IN PVOID Object)
Definition: obref.c:375
smooth NULL
Definition: ftsmooth.c:416
PVOID ExpDefaultErrorPort
Definition: harderr.c:20

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 */
48  if (Action == ShutdownNoReboot)
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 }
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135
#define POWER_ACTION_DISABLE_WAKES
Definition: ntpoapi.h:419
#define POWER_ACTION_OVERRIDE_APPS
Definition: ntpoapi.h:416
void DPRINT(...)
Definition: polytest.cpp:61
NTSTATUS NTAPI NtSetSystemPowerState(IN POWER_ACTION SystemAction, IN SYSTEM_POWER_STATE MinSystemState, IN ULONG Flags)
Definition: power.c:869
#define POWER_ACTION_CRITICAL
Definition: ntpoapi.h:420
_In_ PLIST_ENTRY _In_ PSTRING _In_ USHORT _In_opt_ PSTRING _In_opt_ PSTRING _In_ ULONG _In_ ULONG Action
Definition: fsrtlfuncs.h:738
POWER_ACTION
Definition: ntpoapi.h:122

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