mirror of
https://github.com/reactos/reactos.git
synced 2024-08-19 18:02:55 +00:00
Shutdown after shell exit
svn path=/trunk/; revision=4380
This commit is contained in:
parent
a4907447eb
commit
6aa0e3b90d
|
@ -1,4 +1,4 @@
|
|||
/* $Id: winlogon.c,v 1.16 2003/03/20 19:21:01 rcampbell Exp $
|
||||
/* $Id: winlogon.c,v 1.17 2003/03/20 20:56:52 gvg Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -18,7 +18,7 @@
|
|||
|
||||
#include <wchar.h>
|
||||
|
||||
#define DBG
|
||||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
|
||||
/* GLOBALS ******************************************************************/
|
||||
|
@ -420,51 +420,50 @@ WinMain(HINSTANCE hInstance,
|
|||
*/
|
||||
|
||||
/* Main loop */
|
||||
for (;;)
|
||||
{
|
||||
#if 0
|
||||
/* Display login prompt */
|
||||
WriteConsole(GetStdHandle(STD_OUTPUT_HANDLE),
|
||||
LoginPrompt,
|
||||
strlen(LoginPrompt), // wcslen(LoginPrompt),
|
||||
&Result,
|
||||
NULL);
|
||||
i = 0;
|
||||
do
|
||||
{
|
||||
ReadConsole(GetStdHandle(STD_INPUT_HANDLE),
|
||||
&LoginName[i],
|
||||
1,
|
||||
&Result,
|
||||
NULL);
|
||||
i++;
|
||||
} while (LoginName[i - 1] != '\n');
|
||||
LoginName[i - 1] = 0;
|
||||
/* Display login prompt */
|
||||
WriteConsole(GetStdHandle(STD_OUTPUT_HANDLE),
|
||||
LoginPrompt,
|
||||
strlen(LoginPrompt), // wcslen(LoginPrompt),
|
||||
&Result,
|
||||
NULL);
|
||||
i = 0;
|
||||
do
|
||||
{
|
||||
ReadConsole(GetStdHandle(STD_INPUT_HANDLE),
|
||||
&LoginName[i],
|
||||
1,
|
||||
&Result,
|
||||
NULL);
|
||||
i++;
|
||||
} while (LoginName[i - 1] != '\n');
|
||||
LoginName[i - 1] = 0;
|
||||
|
||||
/* Display password prompt */
|
||||
WriteConsole(GetStdHandle(STD_OUTPUT_HANDLE),
|
||||
PasswordPrompt,
|
||||
strlen(PasswordPrompt), // wcslen(PasswordPrompt),
|
||||
&Result,
|
||||
NULL);
|
||||
i = 0;
|
||||
do
|
||||
{
|
||||
ReadConsole(GetStdHandle(STD_INPUT_HANDLE),
|
||||
&Password[i],
|
||||
1,
|
||||
&Result,
|
||||
NULL);
|
||||
i++;
|
||||
} while (Password[i - 1] != '\n');
|
||||
Password[i - 1] =0;
|
||||
/* Display password prompt */
|
||||
WriteConsole(GetStdHandle(STD_OUTPUT_HANDLE),
|
||||
PasswordPrompt,
|
||||
strlen(PasswordPrompt), // wcslen(PasswordPrompt),
|
||||
&Result,
|
||||
NULL);
|
||||
i = 0;
|
||||
do
|
||||
{
|
||||
ReadConsole(GetStdHandle(STD_INPUT_HANDLE),
|
||||
&Password[i],
|
||||
1,
|
||||
&Result,
|
||||
NULL);
|
||||
i++;
|
||||
} while (Password[i - 1] != '\n');
|
||||
Password[i - 1] =0;
|
||||
#endif
|
||||
if (! DoLoginUser(LoginName, Password))
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
if (! DoLoginUser(LoginName, Password))
|
||||
{
|
||||
}
|
||||
|
||||
NtShutdownSystem(ShutdownNoReboot);
|
||||
|
||||
ExitProcess(0);
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Reference in a new issue