ReactOS 0.4.16-dev-338-g34e76ad
consrv.h File Reference
#include "../winsrv.h"
#include <strsafe.h>
#include <winnls.h>
#include <wincon.h>
#include <ndk/mmfuncs.h>
#include <win/conmsg.h>
#include "heap.h"
#include "include/conio.h"
#include "include/conio_winsrv.h"
#include "api.h"
#include "include/console.h"
#include "include/settings.h"
#include "include/term.h"
#include "console.h"
#include "coninput.h"
#include "conoutput.h"
#include "handle.h"
#include "lineinput.h"
Include dependency graph for consrv.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _CONSOLE_PROCESS_DATA
 

Macros

#define WIN32_NO_STATUS
 
#define _INC_WINDOWS
 
#define COM_NO_WINDOWS_H
 
#define NTOS_MODE_USER
 
#define ConsoleGetPerProcessData(Process)    ((PCONSOLE_PROCESS_DATA)((Process)->ServerData[CONSRV_SERVERDLL_INDEX]))
 

Typedefs

typedef struct _CONSOLE_PROCESS_DATA CONSOLE_PROCESS_DATA
 
typedef struct _CONSOLE_PROCESS_DATAPCONSOLE_PROCESS_DATA
 

Functions

ULONG NTAPI ConsoleClientShutdown (IN PCSR_PROCESS CsrProcess, IN ULONG Flags, IN BOOLEAN FirstPhase)
 

Variables

HINSTANCE ConSrvDllInstance
 

Macro Definition Documentation

◆ _INC_WINDOWS

#define _INC_WINDOWS

Definition at line 19 of file consrv.h.

◆ COM_NO_WINDOWS_H

#define COM_NO_WINDOWS_H

Definition at line 20 of file consrv.h.

◆ ConsoleGetPerProcessData

#define ConsoleGetPerProcessData (   Process)     ((PCONSOLE_PROCESS_DATA)((Process)->ServerData[CONSRV_SERVERDLL_INDEX]))

Definition at line 37 of file consrv.h.

◆ NTOS_MODE_USER

#define NTOS_MODE_USER

Definition at line 25 of file consrv.h.

◆ WIN32_NO_STATUS

#define WIN32_NO_STATUS

Definition at line 18 of file consrv.h.

Typedef Documentation

◆ CONSOLE_PROCESS_DATA

◆ PCONSOLE_PROCESS_DATA

Function Documentation

◆ ConsoleClientShutdown()

ULONG NTAPI ConsoleClientShutdown ( IN PCSR_PROCESS  CsrProcess,
IN ULONG  Flags,
IN BOOLEAN  FirstPhase 
)

Definition at line 72 of file shutdown.c.

75{
77
78 /* Do not kill system processes when a user is logging off */
79 if ((Flags & EWX_SHUTDOWN) == EWX_LOGOFF &&
80 (CsrProcess->ShutdownFlags & (CsrShutdownSystem | CsrShutdownOther)))
81 {
82 DPRINT("Do not kill a system process in a logoff request!\n");
84 }
85
86 /* Is it a console process? */
87 if ( ProcessData->ConsoleHandle != NULL ||
88 ProcessData->HandleTable != NULL )
89 {
91
92 /* We are done with the process itself */
95 }
96 else
97 {
98 DPRINT("ConsoleClientShutdown(0x%p, 0x%x, %s) - Non-console process [0x%x, 0x%x]\n",
99 CsrProcess, Flags, FirstPhase ? "FirstPhase" : "LastPhase",
100 CsrProcess->ClientId.UniqueProcess, CsrProcess->ClientId.UniqueThread);
101
102 /* On first pass, let the gui server terminate all the processes that it owns */
103 if (FirstPhase) return CsrShutdownNonCsrProcess;
104
105 /* Use the generic handler since this isn't a gui process */
107 }
108
110}
#define ConsoleGetPerProcessData(Process)
Definition: consrv.h:37
@ CsrShutdownOther
Definition: csrsrv.h:120
@ CsrShutdownSystem
Definition: csrsrv.h:119
@ CsrShutdownNonCsrProcess
Definition: csrsrv.h:113
@ CsrShutdownCsrProcess
Definition: csrsrv.h:112
VOID NTAPI CsrDereferenceProcess(IN PCSR_PROCESS CsrProcess)
Definition: procsup.c:691
#define NULL
Definition: types.h:112
#define DPRINT
Definition: sndvol32.h:73
HANDLE ConsoleHandle
Definition: consrv.h:45
struct _CONSOLE_IO_HANDLE * HandleTable
Definition: consrv.h:50
PKPROCESS CsrProcess
Definition: videoprt.c:39
static void NotifyConsoleProcessForShutdown(IN PCSR_PROCESS CsrProcess, IN PCONSOLE_PROCESS_DATA ProcessData, IN ULONG Flags)
Definition: shutdown.c:20
ULONG NTAPI NonConsoleProcessShutdown(IN PCSR_PROCESS Process, IN ULONG Flags)
Definition: shutdown.c:44
#define EWX_SHUTDOWN
Definition: winuser.h:639
#define EWX_LOGOFF
Definition: winuser.h:636
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170

Referenced by CSR_SERVER_DLL_INIT().

Variable Documentation

◆ ConSrvDllInstance

HINSTANCE ConSrvDllInstance
extern