1 /* $Id: services.c,v 1.1 2000/03/26 22:00:09 dwelch Exp $
3 * service control manager
5 * ReactOS Operating System
7 * --------------------------------------------------------------------
9 * This software is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License as
11 * published by the Free Software Foundation; either version 2 of the
12 * License, or (at your option) any later version.
14 * This software is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Library General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this software; see the file COPYING.LIB. If not, write
21 * to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge,
26 #include <ddk/ntddk.h>
27 #include <ntdll/rtl.h>
28 #include <services/services.h>
30 VOID
ServicesInitialization(VOID
)
35 /* Native process' entry point */
37 VOID
NtProcessStartup(PPEB Peb
)
39 OBJECT_ATTRIBUTES ObjectAttributes
;
40 HANDLE ServicesInitEvent
;
41 UNICODE_STRING UnicodeString
;
44 DisplayString(L
"Service Control Manager\n");
46 RtlInitUnicodeString(&UnicodeString
,
47 L
"\\ServicesInitDone");
48 InitializeObjectAttributes(&ObjectAttributes
,
53 Status
= NtOpenEvent(&ServicesInitEvent
,
56 if (!NT_SUCCESS(Status
))
58 DbgPrint("SERVICES: Failed to open notification event\n");
61 Status
= ServicesInitialization ();
63 if (!NT_SUCCESS(Status
))
65 DisplayString( L
"SERVICES: Subsystem failed to initialize.\n" );
67 NtTerminateProcess(NtCurrentProcess(), Status
);
71 DisplayString( L
"CSR: Subsystem initialized.\n" );
73 NtSetEvent(ServicesInitEvent
, NULL
);
74 NtTerminateThread(NtCurrentThread(), STATUS_SUCCESS
);