- Fix SleepEx.
[reactos.git] / reactos / base / system / lsass / lsass.c
1 /*
2 * reactos/subsys/system/lsass/lsass.c
3 *
4 * ReactOS Operating System
5 *
6 * --------------------------------------------------------------------
7 *
8 * This software is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License as
10 * published by the Free Software Foundation; either version 2 of the
11 * License, or (at your option) any later version.
12 *
13 * This software is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this software; see the file COPYING.LIB. If not, write
20 * to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge,
21 * MA 02139, USA.
22 *
23 * --------------------------------------------------------------------
24 *
25 * 19990704 (Emanuele Aliberti)
26 * Compiled successfully with egcs 1.1.2
27 */
28 #define WIN32_NO_STATUS
29 #include <windows.h>
30 #define NTOS_MODE_USER
31 #include <ndk/ntndk.h>
32
33 #include <lsass/lsasrv.h>
34 //#include <samsrv.h>
35 #include <lsass/lsass.h>
36
37 #define NDEBUG
38 #include <debug.h>
39
40 static VOID CALLBACK
41 ServiceMain(DWORD argc, LPTSTR *argv);
42
43 static SERVICE_TABLE_ENTRY ServiceTable[2] =
44 {
45 {TEXT("NetLogon"), ServiceMain},
46 {NULL, NULL}
47 };
48
49 static VOID CALLBACK
50 ServiceMain(
51 IN DWORD argc,
52 IN LPWSTR *argv)
53 {
54 DPRINT("ServiceMain() called\n");
55 }
56
57 INT WINAPI
58 WinMain(
59 IN HINSTANCE hInstance,
60 IN HINSTANCE hPrevInstance,
61 IN LPSTR lpCmdLine,
62 IN INT nShowCmd)
63 {
64 NTSTATUS Status = STATUS_SUCCESS;
65
66 DPRINT("Local Security Authority Subsystem\n");
67 DPRINT(" Initializing...\n");
68
69 /* Initialize the LSA server DLL. */
70 Status = LsapInitLsa();
71 if (!NT_SUCCESS(Status))
72 {
73 DPRINT1("LsapInitLsa() failed (Status 0x%08lX)\n", Status);
74 goto ByeBye;
75 }
76
77 #if 0
78 /* Initialize the SAM server DLL. */
79 Status = SamIInitialize();
80 if (!NT_SUCCESS(Status))
81 {
82 DPRINT1("SamIInitialize() failed (Status 0x%08lX)\n", Status);
83 goto ByeBye;
84 }
85 #endif
86
87 /* FIXME: More initialization */
88
89 StartServiceCtrlDispatcher(ServiceTable);
90
91 DPRINT(" Done...\n");
92
93 ByeBye:
94 NtTerminateThread(NtCurrentThread(), Status);
95
96 return 0;
97 }
98
99 /* EOF */