mirror of
https://github.com/reactos/reactos.git
synced 2025-05-20 09:36:16 +00:00
[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. svn path=/trunk/; revision=58326
This commit is contained in:
parent
ebaac9c9e5
commit
c7e70b81fa
4 changed files with 40 additions and 6 deletions
|
@ -414,6 +414,24 @@ GUILockedSAS(
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
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
|
static INT_PTR CALLBACK
|
||||||
LockedWindowProc(
|
LockedWindowProc(
|
||||||
IN HWND hwndDlg,
|
IN HWND hwndDlg,
|
||||||
|
@ -433,6 +451,7 @@ LockedWindowProc(
|
||||||
SetWindowLongPtr(hwndDlg, GWL_USERDATA, (DWORD_PTR)pgContext);
|
SetWindowLongPtr(hwndDlg, GWL_USERDATA, (DWORD_PTR)pgContext);
|
||||||
|
|
||||||
pgContext->hBitmap = LoadImage(hDllInstance, MAKEINTRESOURCE(IDI_ROSLOGO), IMAGE_BITMAP, 0, 0, LR_DEFAULTCOLOR);
|
pgContext->hBitmap = LoadImage(hDllInstance, MAKEINTRESOURCE(IDI_ROSLOGO), IMAGE_BITMAP, 0, 0, LR_DEFAULTCOLOR);
|
||||||
|
OnInitLockedDlg(hwndDlg, pgContext, IDC_LOCKMSG);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
case WM_PAINT:
|
case WM_PAINT:
|
||||||
|
@ -462,11 +481,9 @@ static VOID
|
||||||
GUIDisplayLockedNotice(
|
GUIDisplayLockedNotice(
|
||||||
IN OUT PGINA_CONTEXT pgContext)
|
IN OUT PGINA_CONTEXT pgContext)
|
||||||
{
|
{
|
||||||
int result;
|
|
||||||
|
|
||||||
TRACE("GUIdisplayLockedNotice()\n");
|
TRACE("GUIdisplayLockedNotice()\n");
|
||||||
|
|
||||||
result = pgContext->pWlxFuncs->WlxDialogBoxParam(
|
pgContext->pWlxFuncs->WlxDialogBoxParam(
|
||||||
pgContext->hWlx,
|
pgContext->hWlx,
|
||||||
pgContext->hDllInstance,
|
pgContext->hDllInstance,
|
||||||
MAKEINTRESOURCEW(IDD_LOCKED_DLG),
|
MAKEINTRESOURCEW(IDD_LOCKED_DLG),
|
||||||
|
|
|
@ -54,7 +54,7 @@ FONT 8,"MS Shell Dlg",400,0,1
|
||||||
BEGIN
|
BEGIN
|
||||||
CONTROL IDI_ROSLOGO,IDC_ROSLOGO,"Static",SS_BITMAP,0,0,275,54
|
CONTROL IDI_ROSLOGO,IDC_ROSLOGO,"Static",SS_BITMAP,0,0,275,54
|
||||||
ICON IDI_LOCKICON,-1,7,59,20,20
|
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 "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
|
LTEXT "Drücken Sie Strg+Alt+Entf um den Computer zu entsperren.",IDC_STATIC,37,106,231,8
|
||||||
END
|
END
|
||||||
|
|
|
@ -416,6 +416,7 @@ DoLoginTasks(
|
||||||
TOKEN_STATISTICS Stats;
|
TOKEN_STATISTICS Stats;
|
||||||
PWLX_PROFILE_V2_0 pProfile = NULL;
|
PWLX_PROFILE_V2_0 pProfile = NULL;
|
||||||
DWORD cbStats, cbSize;
|
DWORD cbStats, cbSize;
|
||||||
|
DWORD dwLength;
|
||||||
BOOL bResult;
|
BOOL bResult;
|
||||||
|
|
||||||
if (!LogonUserW(UserName, Domain, Password,
|
if (!LogonUserW(UserName, Domain, Password,
|
||||||
|
@ -427,6 +428,18 @@ DoLoginTasks(
|
||||||
goto cleanup;
|
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 */
|
/* Get profile path */
|
||||||
cbSize = 0;
|
cbSize = 0;
|
||||||
bResult = GetProfilesDirectoryW(NULL, &cbSize);
|
bResult = GetProfilesDirectoryW(NULL, &cbSize);
|
||||||
|
@ -456,13 +469,15 @@ DoLoginTasks(
|
||||||
pProfile->dwType = WLX_PROFILE_TYPE_V2_0;
|
pProfile->dwType = WLX_PROFILE_TYPE_V2_0;
|
||||||
pProfile->pszProfile = ProfilePath;
|
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)
|
if (!lpEnvironment)
|
||||||
{
|
{
|
||||||
WARN("HeapAlloc() failed\n");
|
WARN("HeapAlloc() failed\n");
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
wcscpy(lpEnvironment, L"LOGONSERVER=\\\\Test");
|
|
||||||
|
wsprintfW(lpEnvironment, L"LOGONSERVER=\\\\%s", pgContext->Domain);
|
||||||
|
|
||||||
pProfile->pszEnvironment = lpEnvironment;
|
pProfile->pszEnvironment = lpEnvironment;
|
||||||
|
|
||||||
|
|
|
@ -29,6 +29,8 @@ typedef struct
|
||||||
DWORD AutoLogonState;
|
DWORD AutoLogonState;
|
||||||
|
|
||||||
/* Informations to be filled during logon */
|
/* Informations to be filled during logon */
|
||||||
|
WCHAR UserName[256];
|
||||||
|
WCHAR Domain[256];
|
||||||
HANDLE UserToken;
|
HANDLE UserToken;
|
||||||
PLUID pAuthenticationId;
|
PLUID pAuthenticationId;
|
||||||
PDWORD pdwOptions;
|
PDWORD pdwOptions;
|
||||||
|
|
Loading…
Reference in a new issue