3 * init.c - Session Manager initialization
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 * 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,
24 * --------------------------------------------------------------------
32 /* FUNCTIONS ****************************************************************/
34 typedef NTSTATUS (* SM_INIT_ROUTINE
)(VOID
);
38 SM_INIT_ROUTINE EntryPoint
;
41 {TRUE
, SmCreateHeap
, "create private heap, aborting"},
42 {TRUE
, SmCreateObjectDirectories
, "create object directories"},
43 {TRUE
, SmCreateApiPort
, "create \\SmApiPort"},
44 {TRUE
, SmCreateEnvironment
, "create the system environment"},
45 {TRUE
, SmSetEnvironmentVariables
, "set system environment variables"},
46 {TRUE
, SmInitDosDevices
, "create dos device links"},
47 {TRUE
, SmRunBootApplications
, "run boot applications"},
48 {TRUE
, SmProcessFileRenameList
, "process the file rename list"},
49 {FALSE
, SmLoadKnownDlls
, "preload system DLLs"},
50 {TRUE
, SmCreatePagingFiles
, "create paging files"},
51 {TRUE
, SmInitializeRegistry
, "initialize the registry"},
52 {FALSE
, SmUpdateEnvironment
, "update environment variables"},
53 {TRUE
, SmInitializeClientManagement
, "initialize client management"},
54 {TRUE
, SmLoadSubsystems
, "load subsystems"}
58 InitSessionManager(VOID
)
61 NTSTATUS Status
= STATUS_SUCCESS
;
63 for (i
=0; i
< (sizeof InitRoutine
/ sizeof InitRoutine
[0]); i
++)
65 Status
= InitRoutine
[i
].EntryPoint();
66 if(!NT_SUCCESS(Status
))
68 DPRINT1("SM: %s: failed to %s (Status=%lx)\n",
70 InitRoutine
[i
].ErrorMessage
,
72 if (InitRoutine
[i
].Required
)
78 return(STATUS_SUCCESS
);