no message
[reactos.git] / reactos / drivers / services / services.c
1 /* $Id: services.c,v 1.1 2000/03/26 22:00:09 dwelch Exp $
2 *
3 * service control manager
4 *
5 * ReactOS Operating System
6 *
7 * --------------------------------------------------------------------
8 *
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.
13 *
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.
18 *
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,
22 * MA 02139, USA.
23 *
24 */
25
26 #include <ddk/ntddk.h>
27 #include <ntdll/rtl.h>
28 #include <services/services.h>
29
30 VOID ServicesInitialization(VOID)
31 {
32
33 }
34
35 /* Native process' entry point */
36
37 VOID NtProcessStartup(PPEB Peb)
38 {
39 OBJECT_ATTRIBUTES ObjectAttributes;
40 HANDLE ServicesInitEvent;
41 UNICODE_STRING UnicodeString;
42 NTSTATUS Status;
43
44 DisplayString(L"Service Control Manager\n");
45
46 RtlInitUnicodeString(&UnicodeString,
47 L"\\ServicesInitDone");
48 InitializeObjectAttributes(&ObjectAttributes,
49 &UnicodeString,
50 EVENT_ALL_ACCESS,
51 0,
52 NULL);
53 Status = NtOpenEvent(&ServicesInitEvent,
54 EVENT_ALL_ACCESS,
55 &ObjectAttributes);
56 if (!NT_SUCCESS(Status))
57 {
58 DbgPrint("SERVICES: Failed to open notification event\n");
59 }
60
61 Status = ServicesInitialization ();
62
63 if (!NT_SUCCESS(Status))
64 {
65 DisplayString( L"SERVICES: Subsystem failed to initialize.\n" );
66
67 NtTerminateProcess(NtCurrentProcess(), Status);
68 }
69
70
71 DisplayString( L"CSR: Subsystem initialized.\n" );
72
73 NtSetEvent(ServicesInitEvent, NULL);
74 NtTerminateThread(NtCurrentThread(), STATUS_SUCCESS);
75 }
76
77 /* EOF */