1 /* $Id: init.c 43790 2009-10-27 10:34:16Z dgorbachev $
3 * init.c - ReactOS/Win32 base enviroment subsystem server
5 * ReactOS Operating System
7 * --------------------------------------------------------------------
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * This program 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
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License along
20 * with this program; if not, write to the Free Software Foundation, Inc.,
21 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23 * --------------------------------------------------------------------
30 HANDLE BaseApiPort
= (HANDLE
) 0;
32 /**********************************************************************
34 * BaseStaticServerThread/1
36 VOID WINAPI
BaseStaticServerThread (PVOID x
)
38 NTSTATUS Status
= STATUS_SUCCESS
;
39 PPORT_MESSAGE Request
= (PPORT_MESSAGE
) x
;
40 PPORT_MESSAGE Reply
= NULL
;
41 ULONG MessageType
= 0;
43 DPRINT("BASESRV: %s called\n", __FUNCTION__
);
45 MessageType
= Request
->u2
.s2
.Type
;
46 DPRINT("BASESRV: %s received a message (Type=%d)\n",
47 __FUNCTION__
, MessageType
);
52 Status
= NtReplyPort (BaseApiPort
, Reply
);
58 NTSTATUS WINAPI
ServerDllInitialization (ULONG ArgumentCount
, LPWSTR
*Argument
)
60 NTSTATUS Status
= STATUS_SUCCESS
;
62 DPRINT("BASSRV: %s(%ld,...) called\n", __FUNCTION__
, ArgumentCount
);
64 BaseApiPort
= CsrQueryApiPort ();
65 Status
= CsrAddStaticServerThread (BaseStaticServerThread
);
66 if (NT_SUCCESS(Status
))
68 //TODO initialize the BASE server
70 return STATUS_SUCCESS
;