ReactOS  0.4.14-dev-1112-g2b067d6
csrss.c File Reference
#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 18 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 38 of file csrss.c.

42 {
43  KPRIORITY BasePriority = (8 + 1) + 4;
45  //ULONG Response; // see the #if 0
47  UNREFERENCED_PARAMETER(DebugFlag);
48 
49  /* Set the Priority */
52  &BasePriority,
53  sizeof(KPRIORITY));
54 
55  /* Give us IOPL so that we can access the VGA registers */
58  NULL,
59  0);
60  if (!NT_SUCCESS(Status))
61  {
62  /* Raise a hard error */
63  DPRINT1("CSRSS: Could not raise IOPL, Status: 0x%08lx\n", Status);
64 #if 0
66  0,
67  0,
68  NULL,
69  OptionOk,
70  &Response);
71 #endif
72  }
73 
74  /* Initialize CSR through CSRSRV */
76  if (!NT_SUCCESS(Status))
77  {
78  /* Kill us */
79  DPRINT1("CSRSS: Unable to initialize server, Status: 0x%08lx\n", Status);
81  }
82 
83  /* Disable errors */
85 
86  /* If this is Session 0, make sure killing us bugchecks the system */
88 
89  /* Kill this thread. CSRSRV keeps us going */
91  return 0;
92 }
static int argc
Definition: ServiceArgs.c:12
#define TRUE
Definition: types.h:120
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 UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:323
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:462
VOID NTAPI CsrpSetDefaultProcessHardErrorMode(VOID)
Definition: csrss.c:25
NTSTATUS NTAPI CsrServerInitialization(IN ULONG ArgumentCount, IN PCHAR Arguments[])
Definition: init.c:965
smooth NULL
Definition: ftsmooth.c:416
#define NtCurrentProcess()
Definition: nt_native.h:1657
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:533
Definition: ncftp.h:89
Status
Definition: gdiplustypes.h:24
NTSTATUS NTAPI NtSetInformationProcess(IN HANDLE ProcessHandle, IN PROCESSINFOCLASS ProcessInformationClass, IN PVOID ProcessInformation, IN ULONG ProcessInformationLength)
Definition: query.c:1112
#define NtCurrentPeb()
Definition: FLS.c:20
#define DPRINT1
Definition: precomp.h:8
NTSYSAPI NTSTATUS __cdecl RtlSetProcessIsCritical(_In_ BOOLEAN NewValue, _Out_opt_ PBOOLEAN OldValue, _In_ BOOLEAN NeedBreaks)
NTSTATUS NTAPI NtTerminateProcess(HANDLE ProcessHandle, LONG ExitStatus)

◆ CsrpSetDefaultProcessHardErrorMode()

VOID NTAPI CsrpSetDefaultProcessHardErrorMode ( VOID  )

Definition at line 25 of file csrss.c.

26 {
27  ULONG DefaultHardErrorMode = 0;
28 
29  /* Disable hard errors */
32  &DefaultHardErrorMode,
33  sizeof(DefaultHardErrorMode));
34 }
#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:1112
unsigned int ULONG
Definition: retypes.h:1

Referenced by _main().