ReactOS 0.4.15-dev-7654-g6bc40d3
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{
46#if defined (_X86_)
48#endif
51
52 /* Set the base priority */
55 &BasePriority,
56 sizeof(BasePriority));
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,
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}
#define NtCurrentPeb()
Definition: FLS.c:22
static int argc
Definition: ServiceArgs.c:12
LONG NTSTATUS
Definition: precomp.h:26
#define DPRINT1
Definition: precomp.h:8
NTSTATUS NTAPI CsrServerInitialization(IN ULONG ArgumentCount, IN PCHAR Arguments[])
Definition: init.c:1011
VOID NTAPI CsrpSetDefaultProcessHardErrorMode(VOID)
Definition: csrss.c:26
ULONG DebugFlag
Definition: fxobject.cpp:44
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
LONG KPRIORITY
Definition: compat.h:803
ULONG SessionId
Definition: dllmain.c:28
Status
Definition: gdiplustypes.h:25
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:551
#define PROCESS_PRIORITY_NORMAL_FOREGROUND
Definition: pstypes.h:119
@ ProcessBasePriority
Definition: winternl.h:861
@ ProcessUserModeIOPL
Definition: winternl.h:872
#define argv
Definition: mplay32.c:18
@ OptionOk
Definition: extypes.h:187
NTSYSAPI NTSTATUS __cdecl RtlSetProcessIsCritical(_In_ BOOLEAN NewValue, _Out_opt_ PBOOLEAN OldValue, _In_ BOOLEAN NeedBreaks)
NTSTATUS NtTerminateThread(IN HANDLE ThreadHandle OPTIONAL, IN NTSTATUS ExitStatus)
Definition: kill.c:1279
NTSTATUS NTAPI NtTerminateProcess(HANDLE ProcessHandle, LONG ExitStatus)
#define NtCurrentProcess()
Definition: nt_native.h:1657
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
NTSTATUS NTAPI NtSetInformationProcess(IN HANDLE ProcessHandle, IN PROCESSINFOCLASS ProcessInformationClass, IN PVOID ProcessInformation, IN ULONG ProcessInformationLength)
Definition: query.c:1105
#define STATUS_IO_PRIVILEGE_FAILED
Definition: ntstatus.h:547
Definition: ncftp.h:89
uint32_t ULONG
Definition: typedefs.h:59
#define NtCurrentThread()

◆ 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}
@ ProcessDefaultHardErrorMode
Definition: winternl.h:868

Referenced by _main().