ReactOS  0.4.15-dev-3193-g74513a7
csrss.c File Reference
#include <ndk/exfuncs.h>
#include <ndk/psfuncs.h>
#include <ndk/rtlfuncs.h>
#include <csr/csrsrv.h>
#include <debug.h>
Include dependency graph for csrss.c:

Go to the source code of this file.

Macros

#define NTOS_MODE_USER
 
#define NDEBUG
 

Functions

VOID NTAPI CsrpSetDefaultProcessHardErrorMode (VOID)
 
int _cdecl _main (int argc, char *argv[], char *envp[], int DebugFlag)
 

Macro Definition Documentation

◆ NDEBUG

#define NDEBUG

Definition at line 19 of file csrss.c.

◆ NTOS_MODE_USER

#define NTOS_MODE_USER

Definition at line 12 of file csrss.c.

Function Documentation

◆ _main()

int _cdecl _main ( int  argc,
char argv[],
char envp[],
int  DebugFlag 
)

Definition at line 39 of file csrss.c.

43 {
44  KPRIORITY BasePriority = (8 + 1) + 4;
46 #if defined (_X86_)
48 #endif
51 
52  /* Set the Priority */
55  &BasePriority,
56  sizeof(KPRIORITY));
57 
58 #if defined (_X86_)
59  /* Give us IOPL so that we can access the VGA registers */
62  NULL,
63  0);
64  if (!NT_SUCCESS(Status))
65  {
66  /* Raise a hard error */
67  DPRINT1("CSRSS: Could not raise IOPL, Status: 0x%08lx\n", Status);
69  0,
70  0,
71  NULL,
72  OptionOk,
73  &Response);
74  }
75 #endif
76 
77  /* Initialize CSR through CSRSRV */
79  if (!NT_SUCCESS(Status))
80  {
81  /* Kill us */
82  DPRINT1("CSRSS: Unable to initialize server, Status: 0x%08lx\n", Status);
84  }
85 
86  /* Disable errors */
88 
89  /* If this is Session 0, make sure killing us bugchecks the system */
91 
92  /* Kill this thread. CSRSRV keeps us going */
94  return 0;
95 }
static int argc
Definition: ServiceArgs.c:12
NTSTATUS NTAPI NtRaiseHardError(IN NTSTATUS ErrorStatus, IN ULONG NumberOfParameters, IN ULONG UnicodeStringParameterMask, IN PULONG_PTR Parameters, IN ULONG ValidResponseOptions, OUT PULONG Response)
Definition: harderr.c:553
#define TRUE
Definition: types.h:120
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
ULONG SessionId
Definition: dllmain.c:28
LONG NTSTATUS
Definition: precomp.h:26
#define NtCurrentThread()
#define argv
Definition: mplay32.c:18
LONG KPRIORITY
Definition: compat.h:662
VOID NTAPI CsrpSetDefaultProcessHardErrorMode(VOID)
Definition: csrss.c:26
NTSTATUS NTAPI CsrServerInitialization(IN ULONG ArgumentCount, IN PCHAR Arguments[])
Definition: init.c:971
#define FALSE
Definition: types.h:117
#define NtCurrentProcess()
Definition: nt_native.h:1657
Status
Definition: gdiplustypes.h:24
NTSTATUS NtTerminateThread(IN HANDLE ThreadHandle OPTIONAL, IN NTSTATUS ExitStatus)
Definition: kill.c:1278
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define STATUS_IO_PRIVILEGE_FAILED
Definition: ntstatus.h:547
Definition: ncftp.h:89
ULONG DebugFlag
Definition: fxobject.cpp:44
NTSTATUS NTAPI NtSetInformationProcess(IN HANDLE ProcessHandle, IN PROCESSINFOCLASS ProcessInformationClass, IN PVOID ProcessInformation, IN ULONG ProcessInformationLength)
Definition: query.c:1105
#define NtCurrentPeb()
Definition: FLS.c:22
#define NULL
Definition: types.h:112
#define DPRINT1
Definition: precomp.h:8
NTSYSAPI NTSTATUS __cdecl RtlSetProcessIsCritical(_In_ BOOLEAN NewValue, _Out_opt_ PBOOLEAN OldValue, _In_ BOOLEAN NeedBreaks)
unsigned int ULONG
Definition: retypes.h:1
struct Response Response
NTSTATUS NTAPI NtTerminateProcess(HANDLE ProcessHandle, LONG ExitStatus)

◆ CsrpSetDefaultProcessHardErrorMode()

VOID NTAPI CsrpSetDefaultProcessHardErrorMode ( VOID  )

Definition at line 26 of file csrss.c.

27 {
28  ULONG DefaultHardErrorMode = 0;
29 
30  /* Disable hard errors */
33  &DefaultHardErrorMode,
34  sizeof(DefaultHardErrorMode));
35 }
#define NtCurrentProcess()
Definition: nt_native.h:1657
NTSTATUS NTAPI NtSetInformationProcess(IN HANDLE ProcessHandle, IN PROCESSINFOCLASS ProcessInformationClass, IN PVOID ProcessInformation, IN ULONG ProcessInformationLength)
Definition: query.c:1105
unsigned int ULONG
Definition: retypes.h:1

Referenced by _main().