Author: hpoussin
Date: Thu Aug 3 17:54:44 2006
New Revision: 23434
URL:
http://svn.reactos.org/svn/reactos?rev=23434&view=rev
Log:
Simplify management of loggedout window
Implement locking/unlocking of the workstation (only by code, not the associated dialogs)
Modified:
trunk/reactos/dll/win32/msgina/En.rc
trunk/reactos/dll/win32/msgina/gui.c
trunk/reactos/dll/win32/msgina/msgina.c
trunk/reactos/dll/win32/msgina/msgina.h
trunk/reactos/dll/win32/msgina/msgina.rc
trunk/reactos/dll/win32/msgina/resource.h
trunk/reactos/dll/win32/msgina/stubs.c
trunk/reactos/dll/win32/msgina/tui.c
Modified: trunk/reactos/dll/win32/msgina/En.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msgina/En.rc?rev…
==============================================================================
--- trunk/reactos/dll/win32/msgina/En.rc (original)
+++ trunk/reactos/dll/win32/msgina/En.rc Thu Aug 3 17:54:44 2006
@@ -28,17 +28,21 @@
LTEXT "Password:",IDC_STATIC,36,93,42,8
EDITTEXT IDC_USERNAME,84,72,119,14,ES_AUTOHSCROLL
EDITTEXT IDC_PASSWORD,84,91,119,14,ES_AUTOHSCROLL | ES_PASSWORD
+ CONTROL "",IDC_ROSLOGO,"Static",SS_BLACKFRAME,7,7,261,51
END
-IDD_LOGGEDON_DLG DIALOGEX 0,0,186,52
+IDD_LOGGEDON_DLG DIALOGEX 0,0,247,116
STYLE NOT WS_VISIBLE | DS_3DLOOK | DS_CENTER | DS_MODALFRAME | DS_SETFONT | DS_FIXEDSYS |
WS_BORDER | WS_CAPTION | WS_DLGFRAME | WS_POPUP | WS_SYSMENU
CAPTION "Security"
FONT 8,"MS Shell Dlg 2",400,0,1
BEGIN
- PUSHBUTTON "Cancel",IDCANCEL,125,31,50,14
- PUSHBUTTON "Log off",IDC_LOGOFF,11,31,50,14
- PUSHBUTTON "Shutdown",IDC_SHUTDOWN,69,31,50,14
- LTEXT "What do you want to do?",IDC_STATIC,50,18,87,8
+ PUSHBUTTON "Cancel",IDCANCEL,170,95,70,14
+ PUSHBUTTON "Log off",IDC_LOGOFF,90,76,70,14
+ PUSHBUTTON "Shutdown",IDC_SHUTDOWN,170,76,70,14
+ LTEXT "What do you want to do?",IDC_STATIC,86,53,87,8
+ PUSHBUTTON "Lock computer",IDC_LOCK,10,76,70,14
+ PUSHBUTTON "Task manager",IDC_TASKMGR,90,95,70,14
+ CONTROL "",IDC_ROSLOGO,"Static",SS_BLACKFRAME,7,7,230,38
END
STRINGTABLE
@@ -47,4 +51,3 @@
IDS_ASKFORUSER "User name: "
IDS_ASKFORPASSWORD "Password: "
END
-
Modified: trunk/reactos/dll/win32/msgina/gui.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msgina/gui.c?rev…
==============================================================================
--- trunk/reactos/dll/win32/msgina/gui.c (original)
+++ trunk/reactos/dll/win32/msgina/gui.c Thu Aug 3 17:54:44 2006
@@ -7,15 +7,8 @@
#include "msgina.h"
-#include <debug.h>
-#define TRACE DbgPrint("(%s:%d) ", __FILE__, __LINE__), DbgPrint
-#define FIXME DbgPrint("(%s:%d) ", __FILE__, __LINE__), DbgPrint
-#define WARN DbgPrint("(%s:%d) ", __FILE__, __LINE__), DbgPrint
-#undef DPRINT
-#undef DPRINT1
-
-static HBITMAP hBitmap = NULL;
-static int cxSource, cySource;
+#define YDEBUG
+#include <wine/debug.h>
typedef struct _DISPLAYSTATUSMSG
{
@@ -155,21 +148,30 @@
return TRUE;
}
+static INT_PTR CALLBACK
+DisplaySASNoticeWindowProc(
+ IN HWND hwndDlg,
+ IN UINT uMsg,
+ IN WPARAM wParam,
+ IN LPARAM lParam)
+{
+ return DefWindowProc(hwndDlg, uMsg, wParam, lParam);
+}
+
static VOID
GUIDisplaySASNotice(
IN OUT PGINA_CONTEXT pgContext)
{
- int result;
+ INT result;
TRACE("GUIDisplaySASNotice()\n");
/* Display the notice window */
- result = pgContext->pWlxFuncs->WlxDialogBoxParam(
- pgContext->hWlx,
+ result = DialogBoxParam(
pgContext->hDllInstance,
MAKEINTRESOURCE(IDD_NOTICE_DLG),
NULL,
- (DLGPROC)DefWindowProc,
+ DisplaySASNoticeWindowProc,
(LPARAM)NULL);
if (result == -1)
{
@@ -210,40 +212,37 @@
IN WPARAM wParam,
IN LPARAM lParam)
{
- BITMAP bitmap;
+ PGINA_CONTEXT pgContext;
+
+ pgContext = (PGINA_CONTEXT)GetWindowLongPtr(hwndDlg, GWL_USERDATA);
switch (uMsg)
{
case WM_INITDIALOG:
{
/* FIXME: take care of DontDisplayLastUserName, NoDomainUI, ShutdownWithoutLogon */
- SetWindowLongPtr(hwndDlg, GWL_USERDATA, (DWORD_PTR)lParam);
+ pgContext = (PGINA_CONTEXT)lParam;
+ SetWindowLongPtr(hwndDlg, GWL_USERDATA, (DWORD_PTR)pgContext);
SetFocus(GetDlgItem(hwndDlg, IDC_USERNAME));
- hBitmap = LoadImage(hDllInstance, MAKEINTRESOURCE(IDC_ROSLOGO), IMAGE_BITMAP, 0, 0,
LR_DEFAULTCOLOR);
- if (hBitmap != NULL)
+ pgContext->hBitmap = LoadImage(hDllInstance, MAKEINTRESOURCE(IDI_ROSLOGO),
IMAGE_BITMAP, 0, 0, LR_DEFAULTCOLOR);
+ break;
+ }
+ case WM_PAINT:
+ {
+ PAINTSTRUCT ps;
+ HDC hdc;
+ if (pgContext->hBitmap)
{
- GetObject(hBitmap, sizeof(BITMAP), &bitmap);
- cxSource = bitmap.bmWidth;
- cySource = bitmap.bmHeight;
+ hdc = BeginPaint(hwndDlg, &ps);
+ DrawState(hdc, NULL, NULL, (LPARAM)pgContext->hBitmap, (WPARAM)0, 0, 0, 0, 0,
DST_BITMAP);
+ EndPaint(hwndDlg, &ps);
}
break;
}
- case WM_PAINT:
- {
- PAINTSTRUCT ps;
- HDC hdc, hdcMem;
- hdc = BeginPaint(hwndDlg, &ps);
- hdcMem = CreateCompatibleDC(hdc);
- SelectObject(hdcMem, hBitmap);
- BitBlt(hdc, 0, 0, cxSource, cySource, hdcMem, 0, 0, SRCCOPY);
- DeleteDC(hdcMem);
- EndPaint(hwndDlg, &ps);
- break;
- }
case WM_DESTROY:
{
- DeleteObject(hBitmap);
+ DeleteObject(pgContext->hBitmap);
break;
}
case WM_COMMAND:
@@ -252,10 +251,8 @@
{
case IDOK:
{
- PGINA_CONTEXT pgContext;
LPWSTR UserName = NULL, Password = NULL;
INT result = WLX_SAS_ACTION_NONE;
- pgContext = (PGINA_CONTEXT)GetWindowLongPtr(hwndDlg, GWL_USERDATA);
if (GetTextboxText(hwndDlg, IDC_USERNAME, &UserName) && *UserName ==
'\0')
break;
@@ -300,14 +297,23 @@
{
switch (LOWORD(wParam))
{
- case IDYES:
- case IDNO:
- {
- EndDialog(hwndDlg, LOWORD(wParam));
- break;
- }
+ case IDC_LOCK:
+ EndDialog(hwndDlg, WLX_SAS_ACTION_LOCK_WKSTA);
+ return TRUE;
+ case IDC_LOGOFF:
+ EndDialog(hwndDlg, WLX_SAS_ACTION_LOGOFF);
+ return TRUE;
+ case IDC_SHUTDOWN:
+ EndDialog(hwndDlg, WLX_SAS_ACTION_SHUTDOWN_POWER_OFF);
+ return TRUE;
+ case IDC_TASKMGR:
+ EndDialog(hwndDlg, WLX_SAS_ACTION_TASKLIST);
+ return TRUE;
+ case IDCANCEL:
+ EndDialog(hwndDlg, WLX_SAS_ACTION_NONE);
+ return TRUE;
}
- return TRUE;
+ break;
}
case WM_INITDIALOG:
{
@@ -329,50 +335,30 @@
IN OUT PGINA_CONTEXT pgContext,
IN DWORD dwSasType)
{
- INT SasAction = WLX_SAS_ACTION_NONE;
+ INT result;
TRACE("GUILoggedOnSAS()\n");
- switch (dwSasType)
- {
- case WLX_SAS_TYPE_CTRL_ALT_DEL:
- {
- INT result;
- /* Display "Are you sure you want to log off?" dialog */
- result = pgContext->pWlxFuncs->WlxDialogBoxParam(
- pgContext->hWlx,
- pgContext->hDllInstance,
- MAKEINTRESOURCE(IDD_LOGGEDON_DLG),
- NULL,
- LoggedOnWindowProc,
- (LPARAM)pgContext);
- if (result == IDOK)
- SasAction = WLX_SAS_ACTION_LOCK_WKSTA;
- break;
- }
- case WLX_SAS_TYPE_SC_INSERT:
- {
- FIXME("WlxLoggedOnSAS: SasType WLX_SAS_TYPE_SC_INSERT not supported!\n");
- break;
- }
- case WLX_SAS_TYPE_SC_REMOVE:
- {
- FIXME("WlxLoggedOnSAS: SasType WLX_SAS_TYPE_SC_REMOVE not supported!\n");
- break;
- }
- case WLX_SAS_TYPE_TIMEOUT:
- {
- FIXME("WlxLoggedOnSAS: SasType WLX_SAS_TYPE_TIMEOUT not supported!\n");
- break;
- }
- default:
- {
- WARN("WlxLoggedOnSAS: Unknown SasType: 0x%x\n", dwSasType);
- break;
- }
- }
-
- return SasAction;
+ if (dwSasType != WLX_SAS_TYPE_CTRL_ALT_DEL)
+ {
+ /* Nothing to do for WLX_SAS_TYPE_TIMEOUT ; the dialog will
+ * close itself thanks to the use of WlxDialogBoxParam */
+ return WLX_SAS_ACTION_NONE;
+ }
+
+ result = pgContext->pWlxFuncs->WlxDialogBoxParam(
+ pgContext->hWlx,
+ pgContext->hDllInstance,
+ MAKEINTRESOURCE(IDD_LOGGEDON_DLG),
+ NULL,
+ LoggedOnWindowProc,
+ (LPARAM)pgContext);
+ if (result >= WLX_SAS_ACTION_LOGON &&
+ result <= WLX_SAS_ACTION_SWITCH_CONSOLE)
+ {
+ return result;
+ }
+ return WLX_SAS_ACTION_NONE;
}
static INT
Modified: trunk/reactos/dll/win32/msgina/msgina.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msgina/msgina.c?…
==============================================================================
--- trunk/reactos/dll/win32/msgina/msgina.c (original)
+++ trunk/reactos/dll/win32/msgina/msgina.c Thu Aug 3 17:54:44 2006
@@ -42,7 +42,7 @@
IN DWORD dwWinlogonVersion,
OUT PDWORD pdwDllVersion)
{
- DPRINT1("WlxNegotiate(%lx, %p)\n", dwWinlogonVersion, pdwDllVersion);
+ TRACE("WlxNegotiate(%lx, %p)\n", dwWinlogonVersion, pdwDllVersion);
if(!pdwDllVersion || (dwWinlogonVersion < WLX_VERSION_1_3))
return FALSE;
@@ -147,20 +147,22 @@
PWSTR pszCmdLine)
{
PGINA_CONTEXT pgContext = (PGINA_CONTEXT)pWlxContext;
- STARTUPINFO si;
- PROCESS_INFORMATION pi;
+ STARTUPINFO StartupInfo;
+ PROCESS_INFORMATION ProcessInformation;
+ WCHAR CurrentDirectory[MAX_PATH];
BOOL Ret;
- si.cb = sizeof(STARTUPINFO);
- si.lpReserved = NULL;
- si.lpTitle = pszCmdLine;
- si.dwX = si.dwY = si.dwXSize = si.dwYSize = 0L;
- si.dwFlags = 0;
- si.wShowWindow = SW_SHOW;
- si.lpReserved2 = NULL;
- si.cbReserved2 = 0;
- si.lpDesktop = pszDesktopName;
-
+ StartupInfo.cb = sizeof(STARTUPINFO);
+ StartupInfo.lpReserved = NULL;
+ StartupInfo.lpTitle = pszCmdLine;
+ StartupInfo.dwX = StartupInfo.dwY = StartupInfo.dwXSize = StartupInfo.dwYSize = 0L;
+ StartupInfo.dwFlags = 0;
+ StartupInfo.wShowWindow = SW_SHOW;
+ StartupInfo.lpReserved2 = NULL;
+ StartupInfo.cbReserved2 = 0;
+ StartupInfo.lpDesktop = pszDesktopName;
+
+ GetWindowsDirectoryW (CurrentDirectory, MAX_PATH);
Ret = CreateProcessAsUser(pgContext->UserToken,
NULL,
pszCmdLine,
@@ -169,11 +171,11 @@
FALSE,
CREATE_UNICODE_ENVIRONMENT,
pEnvironment,
- NULL,
- &si,
- &pi);
-
- VirtualFree(pEnvironment, 0, MEM_RELEASE);
+ CurrentDirectory,
+ &StartupInfo,
+ &ProcessInformation);
+
+ //VirtualFree(pEnvironment, 0, MEM_RELEASE);
return Ret;
}
@@ -188,15 +190,10 @@
PWSTR pszMprLogonScript,
PVOID pEnvironment)
{
- PGINA_CONTEXT pgContext = (PGINA_CONTEXT)pWlxContext;
- STARTUPINFO StartupInfo;
- PROCESS_INFORMATION ProcessInformation;
HKEY hKey;
DWORD BufSize, ValueType;
WCHAR pszUserInitApp[MAX_PATH];
WCHAR pszExpUserInitApp[MAX_PATH];
- BOOL Ret;
- WCHAR CurrentDirectory[MAX_PATH];
/* get the path of userinit */
if(RegOpenKeyExW(HKEY_LOCAL_MACHINE,
@@ -216,38 +213,12 @@
return FALSE;
}
RegCloseKey(hKey);
-
- /* start userinit */
+ ExpandEnvironmentStrings(pszUserInitApp, pszExpUserInitApp, MAX_PATH);
+
+ /* Start userinit */
/* FIXME - allow to start more applications that are comma-separated */
- StartupInfo.cb = sizeof(STARTUPINFO);
- StartupInfo.lpReserved = NULL;
- StartupInfo.lpDesktop = pszDesktopName;
- StartupInfo.lpTitle = NULL;
- StartupInfo.dwFlags = 0;
- StartupInfo.lpReserved2 = NULL;
- StartupInfo.cbReserved2 = 0;
- StartupInfo.dwX = StartupInfo.dwY = StartupInfo.dwXSize = StartupInfo.dwYSize = 0;
- StartupInfo.wShowWindow = SW_SHOW;
-
- ExpandEnvironmentStrings(pszUserInitApp, pszExpUserInitApp, MAX_PATH);
-
- GetWindowsDirectoryW (CurrentDirectory, MAX_PATH);
- Ret = CreateProcessAsUser(pgContext->UserToken,
- NULL,
- pszExpUserInitApp,
- NULL,
- NULL,
- FALSE,
- CREATE_UNICODE_ENVIRONMENT,
- pEnvironment,
- CurrentDirectory,
- &StartupInfo,
- &ProcessInformation);
- if(!Ret) ERR("GINA: Failed: 3, error %lu\n", GetLastError());
- VirtualFree(pEnvironment, 0, MEM_RELEASE);
- Ret = pgContext->pWlxFuncs->WlxSwitchDesktopToUser(pgContext->hWlx);
- if(!Ret) ERR("GINA: Failed: 4, error %lu\n", GetLastError());
- return Ret;
+ /* FIXME: Call VirtualFree(pEnvironment, 0, MEM_RELEASE); ? */
+ return WlxStartApplication(pWlxContext, pszDesktopName, pEnvironment,
pszExpUserInitApp);
}
@@ -261,10 +232,36 @@
PVOID pReserved)
{
PGINA_CONTEXT pgContext = (PGINA_CONTEXT)pWlxContext;
-
- DPRINT1("WlxLoggedOnSAS(0x%lx)\n", dwSasType);
-
- return pGinaUI->LoggedOnSAS(pgContext, dwSasType);
+ INT SasAction = WLX_SAS_ACTION_NONE;
+
+ TRACE("WlxLoggedOnSAS(0x%lx)\n", dwSasType);
+
+ switch (dwSasType)
+ {
+ case WLX_SAS_TYPE_CTRL_ALT_DEL:
+ case WLX_SAS_TYPE_TIMEOUT:
+ {
+ SasAction = pGinaUI->LoggedOnSAS(pgContext, dwSasType);
+ break;
+ }
+ case WLX_SAS_TYPE_SC_INSERT:
+ {
+ FIXME("WlxLoggedOnSAS: SasType WLX_SAS_TYPE_SC_INSERT not supported!\n");
+ break;
+ }
+ case WLX_SAS_TYPE_SC_REMOVE:
+ {
+ FIXME("WlxLoggedOnSAS: SasType WLX_SAS_TYPE_SC_REMOVE not supported!\n");
+ break;
+ }
+ default:
+ {
+ WARN("WlxLoggedOnSAS: Unknown SasType: 0x%x\n", dwSasType);
+ break;
+ }
+ }
+
+ return SasAction;
}
/*
@@ -280,7 +277,7 @@
{
PGINA_CONTEXT pgContext = (PGINA_CONTEXT)pWlxContext;
- DPRINT1("WlxDisplayStatusMessage(\"%S\")\n", pMessage);
+ TRACE("WlxDisplayStatusMessage(\"%S\")\n", pMessage);
return pGinaUI->DisplayStatusMessage(pgContext, hDesktop, dwOptions, pTitle,
pMessage);
}
@@ -363,13 +360,13 @@
LOGON32_PROVIDER_DEFAULT,
pgContext->phToken))
{
- WARN("GINA: Logonuser() failed\n");
+ WARN("LogonUserW() failed\n");
return FALSE;
}
- if(!(*pgContext->phToken))
- {
- WARN("GINA: *phToken == NULL!\n");
+ if(!*pgContext->phToken)
+ {
+ WARN("*phToken == NULL!\n");
return FALSE;
}
@@ -384,7 +381,7 @@
sizeof(TOKEN_STATISTICS),
&cbStats))
{
- WARN("GINA: Couldn't get Authentication id from user token!\n");
+ WARN("Couldn't get Authentication id from user token!\n");
return FALSE;
}
*pgContext->pAuthenticationId = Stats.AuthenticationId;
@@ -482,7 +479,7 @@
{
PGINA_CONTEXT pgContext = (PGINA_CONTEXT)pWlxContext;
- DPRINT1("WlxDisplaySASNotice(%p)\n", pWlxContext);
+ TRACE("WlxDisplaySASNotice(%p)\n", pWlxContext);
if (GetSystemMetrics(SM_REMOTESESSION))
{
@@ -501,7 +498,7 @@
pGinaUI->DisplaySASNotice(pgContext);
- DPRINT1("WlxDisplaySASNotice() done\n");
+ TRACE("WlxDisplaySASNotice() done\n");
}
/*
@@ -520,7 +517,7 @@
{
PGINA_CONTEXT pgContext = (PGINA_CONTEXT)pWlxContext;
- DPRINT1("WlxLoggedOutSAS()\n");
+ TRACE("WlxLoggedOutSAS()\n");
pgContext->pAuthenticationId = pAuthenticationId;
pgContext->pdwOptions = pdwOptions;
Modified: trunk/reactos/dll/win32/msgina/msgina.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msgina/msgina.h?…
==============================================================================
--- trunk/reactos/dll/win32/msgina/msgina.h (original)
+++ trunk/reactos/dll/win32/msgina/msgina.h Thu Aug 3 17:54:44 2006
@@ -21,6 +21,9 @@
PHANDLE phToken;
PWLX_MPR_NOTIFY_INFO pNprNotifyInfo;
PVOID *pProfile;
+
+ /* Current logo to display */
+ HBITMAP hBitmap;
} GINA_CONTEXT, *PGINA_CONTEXT;
HINSTANCE hDllInstance;
Modified: trunk/reactos/dll/win32/msgina/msgina.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msgina/msgina.rc…
==============================================================================
--- trunk/reactos/dll/win32/msgina/msgina.rc (original)
+++ trunk/reactos/dll/win32/msgina/msgina.rc Thu Aug 3 17:54:44 2006
@@ -7,8 +7,7 @@
#define REACTOS_STR_ORIGINAL_FILENAME "msgina.dll\0"
#include <reactos/version.rc>
-
-IDC_ROSLOGO BITMAP "resources/reactos.bmp"
+IDI_ROSLOGO BITMAP "resources/reactos.bmp"
#include "En.rc"
Modified: trunk/reactos/dll/win32/msgina/resource.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msgina/resource.…
==============================================================================
--- trunk/reactos/dll/win32/msgina/resource.h (original)
+++ trunk/reactos/dll/win32/msgina/resource.h Thu Aug 3 17:54:44 2006
@@ -11,10 +11,14 @@
#define IDC_PASSWORD 1003
#define IDC_SHUTDOWN 1004
#define IDC_STATUSLABEL 1005
-#define IDC_ROSLOGO 1006
+#define IDC_LOCK 1006
+#define IDC_ROSLOGO 1007
+#define IDI_ROSLOGO 1008
#define IDS_ASKFORUSER 40000
#define IDS_PRESSCTRLALTDELETE 40001
+#define IDC_TASKMGR 40002
#define IDS_ASKFORPASSWORD 40002
+
#endif /* __MSGINA_RESOURCE_H */
Modified: trunk/reactos/dll/win32/msgina/stubs.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msgina/stubs.c?r…
==============================================================================
--- trunk/reactos/dll/win32/msgina/stubs.c (original)
+++ trunk/reactos/dll/win32/msgina/stubs.c Thu Aug 3 17:54:44 2006
@@ -56,7 +56,7 @@
PVOID pWlxContext)
{
UNIMPLEMENTED;
- return FALSE;
+ return TRUE;
}
@@ -68,7 +68,7 @@
PVOID pWlxContext)
{
UNIMPLEMENTED;
- return FALSE;
+ return TRUE;
}
@@ -106,7 +106,7 @@
DWORD dwSasType)
{
UNIMPLEMENTED;
- return 0;
+ return WLX_SAS_ACTION_UNLOCK_WKSTA;
}
Modified: trunk/reactos/dll/win32/msgina/tui.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msgina/tui.c?rev…
==============================================================================
--- trunk/reactos/dll/win32/msgina/tui.c (original)
+++ trunk/reactos/dll/win32/msgina/tui.c Thu Aug 3 17:54:44 2006
@@ -7,12 +7,8 @@
#include "msgina.h"
-#include <debug.h>
-#define TRACE DbgPrint("(%s:%d) ", __FILE__, __LINE__), DbgPrint
-#define FIXME DbgPrint("(%s:%d) ", __FILE__, __LINE__), DbgPrint
-#define WARN DbgPrint("(%s:%d) ", __FILE__, __LINE__), DbgPrint
-#undef DPRINT
-#undef DPRINT1
+#define YDEBUG
+#include <wine/debug.h>
static BOOL
TUIInitialize(
@@ -77,8 +73,15 @@
IN DWORD dwSasType)
{
TRACE("TUILoggedOnSAS()\n");
- for (;;) FIXME("FIXME!\n");
- return 0;
+
+ if (dwSasType != WLX_SAS_TYPE_CTRL_ALT_DEL)
+ {
+ /* Nothing to do for WLX_SAS_TYPE_TIMEOUT */
+ return WLX_SAS_ACTION_NONE;
+ }
+
+ FIXME("FIXME: TUILoggedOnSAS(): Let's suppose the user wants to log
off...\n");
+ return WLX_SAS_ACTION_LOGOFF;
}
static BOOL
@@ -122,18 +125,18 @@
TUILoggedOutSAS(
IN OUT PGINA_CONTEXT pgContext)
{
- WCHAR User[256];
+ WCHAR UserName[256];
WCHAR Password[256];
TRACE("TUILoggedOutSAS()\n");
/* Ask the user for credentials */
- if (!ReadString(pgContext, IDS_ASKFORUSER, User, 256, TRUE))
+ if (!ReadString(pgContext, IDS_ASKFORUSER, UserName, 256, TRUE))
return WLX_SAS_ACTION_NONE;
if (!ReadString(pgContext, IDS_ASKFORPASSWORD, Password, 256, FALSE))
return WLX_SAS_ACTION_NONE;
- if (DoLoginTasks(pgContext, User, NULL, Password))
+ if (DoLoginTasks(pgContext, UserName, NULL, Password))
return WLX_SAS_ACTION_LOGON;
else
return WLX_SAS_ACTION_NONE;