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
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -18,7 +18,7 @@
|
||||||
|
|
||||||
#include <wchar.h>
|
#include <wchar.h>
|
||||||
|
|
||||||
#define DBG
|
#define NDEBUG
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
|
|
||||||
/* GLOBALS ******************************************************************/
|
/* GLOBALS ******************************************************************/
|
||||||
|
@ -381,7 +381,7 @@ WinMain(HINSTANCE hInstance,
|
||||||
{
|
{
|
||||||
DbgPrint("WL: Cannot switch to Winlogon desktop (0x%X)\n", GetLastError());
|
DbgPrint("WL: Cannot switch to Winlogon desktop (0x%X)\n", GetLastError());
|
||||||
}
|
}
|
||||||
|
|
||||||
AllocConsole();
|
AllocConsole();
|
||||||
SetConsoleTitle( "Winlogon" );
|
SetConsoleTitle( "Winlogon" );
|
||||||
/* start system processes (services.exe & lsass.exe) */
|
/* start system processes (services.exe & lsass.exe) */
|
||||||
|
@ -420,50 +420,49 @@ WinMain(HINSTANCE hInstance,
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Main loop */
|
/* Main loop */
|
||||||
for (;;)
|
|
||||||
{
|
|
||||||
#if 0
|
#if 0
|
||||||
/* Display login prompt */
|
/* Display login prompt */
|
||||||
WriteConsole(GetStdHandle(STD_OUTPUT_HANDLE),
|
WriteConsole(GetStdHandle(STD_OUTPUT_HANDLE),
|
||||||
LoginPrompt,
|
LoginPrompt,
|
||||||
strlen(LoginPrompt), // wcslen(LoginPrompt),
|
strlen(LoginPrompt), // wcslen(LoginPrompt),
|
||||||
&Result,
|
&Result,
|
||||||
NULL);
|
NULL);
|
||||||
i = 0;
|
i = 0;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
ReadConsole(GetStdHandle(STD_INPUT_HANDLE),
|
ReadConsole(GetStdHandle(STD_INPUT_HANDLE),
|
||||||
&LoginName[i],
|
&LoginName[i],
|
||||||
1,
|
1,
|
||||||
&Result,
|
&Result,
|
||||||
NULL);
|
NULL);
|
||||||
i++;
|
i++;
|
||||||
} while (LoginName[i - 1] != '\n');
|
} while (LoginName[i - 1] != '\n');
|
||||||
LoginName[i - 1] = 0;
|
LoginName[i - 1] = 0;
|
||||||
|
|
||||||
/* Display password prompt */
|
/* Display password prompt */
|
||||||
WriteConsole(GetStdHandle(STD_OUTPUT_HANDLE),
|
WriteConsole(GetStdHandle(STD_OUTPUT_HANDLE),
|
||||||
PasswordPrompt,
|
PasswordPrompt,
|
||||||
strlen(PasswordPrompt), // wcslen(PasswordPrompt),
|
strlen(PasswordPrompt), // wcslen(PasswordPrompt),
|
||||||
&Result,
|
&Result,
|
||||||
NULL);
|
NULL);
|
||||||
i = 0;
|
i = 0;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
ReadConsole(GetStdHandle(STD_INPUT_HANDLE),
|
ReadConsole(GetStdHandle(STD_INPUT_HANDLE),
|
||||||
&Password[i],
|
&Password[i],
|
||||||
1,
|
1,
|
||||||
&Result,
|
&Result,
|
||||||
NULL);
|
NULL);
|
||||||
i++;
|
i++;
|
||||||
} while (Password[i - 1] != '\n');
|
} while (Password[i - 1] != '\n');
|
||||||
Password[i - 1] =0;
|
Password[i - 1] =0;
|
||||||
#endif
|
#endif
|
||||||
if (! DoLoginUser(LoginName, Password))
|
|
||||||
{
|
if (! DoLoginUser(LoginName, Password))
|
||||||
break;
|
{
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
NtShutdownSystem(ShutdownNoReboot);
|
||||||
|
|
||||||
ExitProcess(0);
|
ExitProcess(0);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue