Author: ekohl Date: Sun Feb 17 01:06:24 2013 New Revision: 58326
URL: http://svn.reactos.org/svn/reactos?rev=58326&view=rev Log: [MSGINA] - Fix a typo in the german lock dialog. - Store the user name and domain in the gina context and use them in the lock dialog. - Initialize the LOGONSERVER environment variable.
Modified: trunk/reactos/dll/win32/msgina/gui.c trunk/reactos/dll/win32/msgina/lang/de-DE.rc trunk/reactos/dll/win32/msgina/msgina.c trunk/reactos/dll/win32/msgina/msgina.h
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] Sun Feb 17 01:06:24 2013 @@ -414,6 +414,24 @@ }
+static VOID +OnInitLockedDlg(HWND hwnd, + PGINA_CONTEXT pgContext, + UINT id) +{ + WCHAR Buffer1[256]; + WCHAR Buffer2[256]; + WCHAR Buffer3[512]; + + LoadStringW(pgContext->hDllInstance, IDS_LOCKMSG, Buffer1, 256); + + wsprintfW(Buffer2, L"%s\%s", pgContext->Domain, pgContext->UserName); + wsprintfW(Buffer3, Buffer1, Buffer2); + + SetWindowTextW(GetDlgItem(hwnd, id), Buffer3); +} + + static INT_PTR CALLBACK LockedWindowProc( IN HWND hwndDlg, @@ -433,6 +451,7 @@ SetWindowLongPtr(hwndDlg, GWL_USERDATA, (DWORD_PTR)pgContext);
pgContext->hBitmap = LoadImage(hDllInstance, MAKEINTRESOURCE(IDI_ROSLOGO), IMAGE_BITMAP, 0, 0, LR_DEFAULTCOLOR); + OnInitLockedDlg(hwndDlg, pgContext, IDC_LOCKMSG); return TRUE; } case WM_PAINT: @@ -462,11 +481,9 @@ GUIDisplayLockedNotice( IN OUT PGINA_CONTEXT pgContext) { - int result; - TRACE("GUIdisplayLockedNotice()\n");
- result = pgContext->pWlxFuncs->WlxDialogBoxParam( + pgContext->pWlxFuncs->WlxDialogBoxParam( pgContext->hWlx, pgContext->hDllInstance, MAKEINTRESOURCEW(IDD_LOCKED_DLG),
Modified: trunk/reactos/dll/win32/msgina/lang/de-DE.rc URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msgina/lang/de-DE... ============================================================================== --- trunk/reactos/dll/win32/msgina/lang/de-DE.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msgina/lang/de-DE.rc [iso-8859-1] Sun Feb 17 01:06:24 2013 @@ -54,7 +54,7 @@ BEGIN CONTROL IDI_ROSLOGO,IDC_ROSLOGO,"Static",SS_BITMAP,0,0,275,54 ICON IDI_LOCKICON,-1,7,59,20,20 - LTEXT "Dieser Computer wird verwndet und ist gesperrt.",IDC_STATIC,37,61,231,8 + LTEXT "Dieser Computer wird verwendet und ist gesperrt.",IDC_STATIC,37,61,231,8 LTEXT "Message",IDC_LOCKMSG,37,75,231,26 LTEXT "Drücken Sie Strg+Alt+Entf um den Computer zu entsperren.",IDC_STATIC,37,106,231,8 END
Modified: trunk/reactos/dll/win32/msgina/msgina.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msgina/msgina.c?r... ============================================================================== --- trunk/reactos/dll/win32/msgina/msgina.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msgina/msgina.c [iso-8859-1] Sun Feb 17 01:06:24 2013 @@ -416,6 +416,7 @@ TOKEN_STATISTICS Stats; PWLX_PROFILE_V2_0 pProfile = NULL; DWORD cbStats, cbSize; + DWORD dwLength; BOOL bResult;
if (!LogonUserW(UserName, Domain, Password, @@ -427,6 +428,18 @@ goto cleanup; }
+ /* Store user and domain in the context */ + wcscpy(pgContext->UserName, UserName); + if (Domain == NULL || wcslen(Domain) == 0) + { + dwLength = 256; + GetComputerNameW(pgContext->Domain, &dwLength); + } + else + { + wcscpy(pgContext->Domain, Domain); + } + /* Get profile path */ cbSize = 0; bResult = GetProfilesDirectoryW(NULL, &cbSize); @@ -456,13 +469,15 @@ pProfile->dwType = WLX_PROFILE_TYPE_V2_0; pProfile->pszProfile = ProfilePath;
- lpEnvironment = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, 32 * sizeof(WCHAR)); + lpEnvironment = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, + (wcslen(pgContext->Domain)+ 14) * sizeof(WCHAR)); if (!lpEnvironment) { WARN("HeapAlloc() failed\n"); goto cleanup; } - wcscpy(lpEnvironment, L"LOGONSERVER=\\Test"); + + wsprintfW(lpEnvironment, L"LOGONSERVER=\\%s", pgContext->Domain);
pProfile->pszEnvironment = lpEnvironment;
Modified: trunk/reactos/dll/win32/msgina/msgina.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msgina/msgina.h?r... ============================================================================== --- trunk/reactos/dll/win32/msgina/msgina.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msgina/msgina.h [iso-8859-1] Sun Feb 17 01:06:24 2013 @@ -29,6 +29,8 @@ DWORD AutoLogonState;
/* Informations to be filled during logon */ + WCHAR UserName[256]; + WCHAR Domain[256]; HANDLE UserToken; PLUID pAuthenticationId; PDWORD pdwOptions;