mirror of
https://github.com/reactos/reactos.git
synced 2024-08-19 18:02:55 +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
|
@ -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
|
||||
LockedWindowProc(
|
||||
IN HWND hwndDlg,
|
||||
|
@ -433,6 +451,7 @@ LockedWindowProc(
|
|||
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 @@ static VOID
|
|||
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),
|
||||
|
|
|
@ -54,7 +54,7 @@ FONT 8,"MS Shell Dlg",400,0,1
|
|||
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
|
||||
|
|
|
@ -416,6 +416,7 @@ DoLoginTasks(
|
|||
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 @@ DoLoginTasks(
|
|||
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 @@ DoLoginTasks(
|
|||
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;
|
||||
|
||||
|
|
|
@ -29,6 +29,8 @@ typedef struct
|
|||
DWORD AutoLogonState;
|
||||
|
||||
/* Informations to be filled during logon */
|
||||
WCHAR UserName[256];
|
||||
WCHAR Domain[256];
|
||||
HANDLE UserToken;
|
||||
PLUID pAuthenticationId;
|
||||
PDWORD pdwOptions;
|
||||
|
|
Loading…
Reference in a new issue