Author: ekohl
Date: Sat Feb 8 21:33:13 2014
New Revision: 62059
URL:
http://svn.reactos.org/svn/reactos?rev=62059&view=rev
Log:
[MSGINA]
- Display the current domain in the logon dialog and pass it to the logon routine.
- Fix wrong default domain registry value name.
Modified:
trunk/reactos/dll/win32/msgina/gui.c
trunk/reactos/dll/win32/msgina/msgina.c
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 [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msgina/gui.c [iso-8859-1] Sat Feb 8 21:33:13 2014
@@ -707,6 +707,9 @@
if (pgContext->bShutdownWithoutLogon == FALSE)
EnableWindow(GetDlgItem(hwndDlg, IDC_SHUTDOWN), FALSE);
+ SendDlgItemMessageW(hwndDlg, IDC_LOGON_TO, CB_ADDSTRING, 0,
(LPARAM)pgContext->Domain);
+ SendDlgItemMessageW(hwndDlg, IDC_LOGON_TO, CB_SETCURSEL, 0, 0);
+
SetFocus(GetDlgItem(hwndDlg, pgContext->bDontDisplayLastUserName ?
IDC_USERNAME : IDC_PASSWORD));
pgContext->hBitmap = LoadImage(hDllInstance, MAKEINTRESOURCE(IDI_ROSLOGO),
IMAGE_BITMAP, 0, 0, LR_DEFAULTCOLOR);
@@ -735,13 +738,15 @@
{
case IDOK:
{
- LPWSTR UserName = NULL, Password = NULL;
+ LPWSTR UserName = NULL, Password = NULL, Domain = NULL;
INT result = WLX_SAS_ACTION_NONE;
if (GetTextboxText(hwndDlg, IDC_USERNAME, &UserName) &&
*UserName == '\0')
break;
+ if (GetTextboxText(hwndDlg, IDC_LOGON_TO, &Domain) &&
*Domain == '\0')
+ break;
if (GetTextboxText(hwndDlg, IDC_PASSWORD, &Password) &&
- DoLoginTasks(pgContext, UserName, NULL, Password))
+ DoLoginTasks(pgContext, UserName, Domain, Password))
{
pgContext->Password = HeapAlloc(GetProcessHeap(),
HEAP_ZERO_MEMORY,
@@ -753,6 +758,7 @@
}
HeapFree(GetProcessHeap(), 0, UserName);
HeapFree(GetProcessHeap(), 0, Password);
+ HeapFree(GetProcessHeap(), 0, Domain);
EndDialog(hwndDlg, result);
return TRUE;
}
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 [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msgina/msgina.c [iso-8859-1] Sat Feb 8 21:33:13 2014
@@ -237,7 +237,7 @@
dwSize = 256 * sizeof(WCHAR);
rc = RegQueryValueExW(hKey,
- L"DefaultDomainName",
+ L"DefaultDomain",
NULL,
NULL,
(LPBYTE)&pgContext->Domain,
@@ -801,7 +801,7 @@
LPWSTR AutoCount = NULL;
LPWSTR IgnoreShiftOverride = NULL;
LPWSTR UserName = NULL;
- LPWSTR DomainName = NULL;
+ LPWSTR Domain = NULL;
LPWSTR Password = NULL;
BOOL result = FALSE;
LONG rc;
@@ -860,14 +860,14 @@
rc = ReadRegSzKey(WinLogonKey, L"DefaultUserName", &UserName);
if (rc != ERROR_SUCCESS)
goto cleanup;
- rc = ReadRegSzKey(WinLogonKey, L"DefaultDomainName", &DomainName);
+ rc = ReadRegSzKey(WinLogonKey, L"DefaultDomain", &Domain);
if (rc != ERROR_SUCCESS && rc != ERROR_FILE_NOT_FOUND)
goto cleanup;
rc = ReadRegSzKey(WinLogonKey, L"DefaultPassword", &Password);
if (rc != ERROR_SUCCESS)
goto cleanup;
- result = DoLoginTasks(pgContext, UserName, DomainName, Password);
+ result = DoLoginTasks(pgContext, UserName, Domain, Password);
if (result == TRUE)
{
@@ -888,7 +888,7 @@
HeapFree(GetProcessHeap(), 0, AutoCount);
HeapFree(GetProcessHeap(), 0, IgnoreShiftOverride);
HeapFree(GetProcessHeap(), 0, UserName);
- HeapFree(GetProcessHeap(), 0, DomainName);
+ HeapFree(GetProcessHeap(), 0, Domain);
HeapFree(GetProcessHeap(), 0, Password);
TRACE("DoAutoLogon(): AutoLogonState = %lu, returning %d\n",
pgContext->AutoLogonState, result);