3 * WIN32MU.DLL - init.c - Initialize the server DLL
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 * --------------------------------------------------------------------
26 #define NTOS_MODE_USER
34 static NTSTATUS STDCALL
35 W32muLoadRemoteTerminalProxy (VOID
)
37 SYSTEM_LOAD_AND_CALL_IMAGE ImageInfo
;
38 NTSTATUS Status
= STATUS_SUCCESS
;
40 DPRINT("W32MU: loading remote terminal device\n");
42 /* Load kernel mode module */
43 RtlInitUnicodeString (& ImageInfo
.ModuleName
,
44 L
"\\SystemRoot\\system32\\w32mut.sys");
46 Status
= NtSetSystemInformation (SystemLoadAndCallImage
,
48 sizeof (SYSTEM_LOAD_AND_CALL_IMAGE
));
50 DPRINT("W32MU: w32mut.sys loaded\n", Status
);
51 if (!NT_SUCCESS(Status
))
53 DPRINT("W32MU: loading w32mut.sys failed (Status=0x%08lx)\n", Status
);
59 /* Public entry point for CSRSS.EXE to load us */
62 ServerDllInitialization (int a0
, int a1
, int a2
, int a3
, int a4
)
64 NTSTATUS Status
= STATUS_SUCCESS
;
67 * 1) load a kernel mode module to make Kmode happy
68 * (it will provide keyoard, display and pointer
69 * devices for window stations not attached to
72 Status
= W32muLoadRemoteTerminalProxy ();
74 * 2) pick up from the registry the list of session
75 * access providers (SAP: Local, RFB, RDP, ICA, ...);
76 * 3) initialize each SAP;
77 * 4) on SAP events, provide:
78 * 4.1) create session (SESSION->new);
79 * 4.2) suspend session (SESSION->state_change);
80 * 4.3) destroy session (SESSION->delete).