1 /* $Id: main.c,v 1.3 2002/10/29 04:45:54 rex Exp $
3 * PROJECT : ReactOS / POSIX+ Environment Subsystem Server
4 * FILE : reactos/subsys/psx/server/misc/main.c
5 * DESCRIPTION: POSIX+ server main.
7 * AUTHOR : Emanuele Aliberti <eal@users.sf.net>
9 * --------------------------------------------------------------------
11 * This software is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License as
13 * published by the Free Software Foundation; either version 2 of the
14 * License, or (at your option) any later version.
16 * This software is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 * General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this software; see the file COPYING. If not, write
23 * to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge,
26 * --------------------------------------------------------------------
28 * 19990605 (Emanuele Aliberti)
29 * Compiled successfully with egcs 1.1.2
30 * 20020323 (Emanuele Aliberti)
31 * Converted to Win32 for testing it using NT LPC.
34 #include <reactos/buildno.h>
37 /*** EXTERNAL ********************************************************/
40 PsxServerInitialization (
41 IN ULONG ArgumentCount
,
42 IN PWSTR
*ArgumentArray
45 /*** ENTRY POINT *****************************************************/
47 #ifdef __PSXSS_ON_W32__ // W32 PSXSS.EXE
48 int main (int argc
, char * argv
[])
52 debug_print(L
"POSIX+ Subsystem for ReactOS "KERNEL_RELEASE_STR
);
54 if (STATUS_SUCCESS
== PsxServerInitialization(0,NULL
))
56 debug_print(L
"PSXSS: server active");
65 debug_print(L
"PSXSS: Subsystem initialization failed.\n");
69 #else /* Native PSXSS.EXE */
70 VOID
NtProcessStartup (PPEB Peb
)
72 UNICODE_STRING Banner
;
74 RtlInitUnicodeString (& Banner
, L
"POSIX+ Subsystem for ReactOS "KERNEL_RELEASE_STR
);
75 NtDisplayString(& Banner
);
77 if (STATUS_SUCCESS
== PsxServerInitialization(0,NULL
))
79 DbgPrint("PSXSS: server active\n");
84 DbgPrint("PSXSS: Subsystem initialization failed.\n");
86 NtTerminateProcess (NtCurrentProcess(), 0);