[MSGINA] Rename context variable: Domain -> DomainName
authorEric Kohl <eric.kohl@reactos.org>
Tue, 22 May 2018 12:39:38 +0000 (14:39 +0200)
committerEric Kohl <eric.kohl@reactos.org>
Tue, 22 May 2018 12:39:38 +0000 (14:39 +0200)
dll/win32/msgina/gui.c
dll/win32/msgina/msgina.c
dll/win32/msgina/msgina.h

index 46110df..c520f07 100644 (file)
@@ -435,7 +435,7 @@ DoChangePassword(
                        IDS_PASSWORDCHANGED);
 
     if ((wcscmp(UserName, pgContext->UserName) == 0) &&
-        (wcscmp(Domain, pgContext->Domain) == 0) &&
+        (wcscmp(Domain, pgContext->DomainName) == 0) &&
         (wcscmp(OldPassword, pgContext->Password) == 0))
     {
         ZeroMemory(pgContext->Password, sizeof(pgContext->Password));
@@ -472,7 +472,7 @@ ChangePasswordDialogProc(
             SetWindowLongPtrW(hwndDlg, GWLP_USERDATA, (LONG_PTR)pgContext);
 
             SetDlgItemTextW(hwndDlg, IDC_CHANGEPWD_USERNAME, pgContext->UserName);
-            SendDlgItemMessageW(hwndDlg, IDC_CHANGEPWD_DOMAIN, CB_ADDSTRING, 0, (LPARAM)pgContext->Domain);
+            SendDlgItemMessageW(hwndDlg, IDC_CHANGEPWD_DOMAIN, CB_ADDSTRING, 0, (LPARAM)pgContext->DomainName);
             SendDlgItemMessageW(hwndDlg, IDC_CHANGEPWD_DOMAIN, CB_SETCURSEL, 0, 0);
             SetFocus(GetDlgItem(hwndDlg, IDC_CHANGEPWD_OLDPWD));
             return TRUE;
@@ -520,7 +520,7 @@ OnInitSecurityDlg(HWND hwnd,
 
     LoadStringW(pgContext->hDllInstance, IDS_LOGONMSG, Buffer1, _countof(Buffer1));
 
-    wsprintfW(Buffer2, L"%s\\%s", pgContext->Domain, pgContext->UserName);
+    wsprintfW(Buffer2, L"%s\\%s", pgContext->DomainName, pgContext->UserName);
     wsprintfW(Buffer4, Buffer1, Buffer2);
 
     SetDlgItemTextW(hwnd, IDC_LOGONMSG, Buffer4);
@@ -836,7 +836,7 @@ DoLogon(
 
             Status = DoLoginTasks(pgContext,
                                   pgContext->UserName,
-                                  pgContext->Domain,
+                                  pgContext->DomainName,
                                   pgContext->Password,
                                   &SubStatus);
             if (!NT_SUCCESS(Status))
@@ -910,12 +910,12 @@ SetDomainComboBox(
         lIndex = SendMessageW(hwndDomainComboBox, CB_ADDSTRING, 0, (LPARAM)szComputerName);
     }
 
-    if (wcslen(pgContext->Domain) != 0)
+    if (wcslen(pgContext->DomainName) != 0)
     {
-        lFindIndex = SendMessageW(hwndDomainComboBox, CB_FINDSTRINGEXACT, (WPARAM)-1, (LPARAM)pgContext->Domain);
+        lFindIndex = SendMessageW(hwndDomainComboBox, CB_FINDSTRINGEXACT, (WPARAM)-1, (LPARAM)pgContext->DomainName);
         if (lFindIndex == CB_ERR)
         {
-            lIndex = SendMessageW(hwndDomainComboBox, CB_ADDSTRING, 0, (LPARAM)pgContext->Domain);
+            lIndex = SendMessageW(hwndDomainComboBox, CB_ADDSTRING, 0, (LPARAM)pgContext->DomainName);
         }
         else
         {
@@ -1125,7 +1125,7 @@ SetLockMessage(HWND hwnd,
 
     LoadStringW(pgContext->hDllInstance, IDS_LOCKMSG, Buffer1, _countof(Buffer1));
 
-    wsprintfW(Buffer2, L"%s\\%s", pgContext->Domain, pgContext->UserName);
+    wsprintfW(Buffer2, L"%s\\%s", pgContext->DomainName, pgContext->UserName);
     wsprintfW(Buffer3, Buffer1, Buffer2);
 
     SetDlgItemTextW(hwnd, nDlgItem, Buffer3);
@@ -1179,7 +1179,7 @@ DoUnlock(
             else
             {
                 LoadStringW(pgContext->hDllInstance, IDS_LOCKEDWRONGUSER, Buffer1, _countof(Buffer1));
-                wsprintfW(Buffer2, Buffer1, pgContext->Domain, pgContext->UserName);
+                wsprintfW(Buffer2, Buffer1, pgContext->DomainName, pgContext->UserName);
                 LoadStringW(pgContext->hDllInstance, IDS_COMPUTERLOCKED, Buffer1, _countof(Buffer1));
                 MessageBoxW(hwndDlg, Buffer2, Buffer1, MB_OK | MB_ICONERROR);
             }
index 90e5925..8f6c3a9 100644 (file)
@@ -244,12 +244,12 @@ GetRegistrySettings(PGINA_CONTEXT pgContext)
                           (LPBYTE)&pgContext->UserName,
                           &dwSize);
 
-    dwSize = sizeof(pgContext->Domain);
+    dwSize = sizeof(pgContext->DomainName);
     rc = RegQueryValueExW(hKey,
                           L"DefaultDomainName",
                           NULL,
                           NULL,
-                          (LPBYTE)&pgContext->Domain,
+                          (LPBYTE)&pgContext->DomainName,
                           &dwSize);
 
     dwSize = sizeof(pgContext->Password);
@@ -803,12 +803,12 @@ CreateProfile(
     wcscpy(pgContext->UserName, UserName);
     if (Domain == NULL || wcslen(Domain) == 0)
     {
-        dwLength = _countof(pgContext->Domain);
-        GetComputerNameW(pgContext->Domain, &dwLength);
+        dwLength = _countof(pgContext->DomainName);
+        GetComputerNameW(pgContext->DomainName, &dwLength);
     }
     else
     {
-        wcscpy(pgContext->Domain, Domain);
+        wcscpy(pgContext->DomainName, Domain);
     }
 
     /* Get profile path */
@@ -841,7 +841,7 @@ CreateProfile(
     pProfile->pszProfile = ProfilePath;
 
     cbSize = sizeof(L"LOGONSERVER=\\\\") +
-             wcslen(pgContext->Domain) * sizeof(WCHAR) +
+             wcslen(pgContext->DomainName) * sizeof(WCHAR) +
              sizeof(UNICODE_NULL);
     lpEnvironment = HeapAlloc(GetProcessHeap(), 0, cbSize);
     if (!lpEnvironment)
@@ -850,7 +850,7 @@ CreateProfile(
         goto cleanup;
     }
 
-    StringCbPrintfW(lpEnvironment, cbSize, L"LOGONSERVER=\\\\%ls", pgContext->Domain);
+    StringCbPrintfW(lpEnvironment, cbSize, L"LOGONSERVER=\\\\%ls", pgContext->DomainName);
     ASSERT(wcslen(lpEnvironment) == cbSize / sizeof(WCHAR) - 2);
     lpEnvironment[cbSize / sizeof(WCHAR) - 1] = UNICODE_NULL;
 
index 2243cb8..19eabf9 100644 (file)
@@ -48,7 +48,7 @@ typedef struct
 
     /* Information to be filled during logon */
     WCHAR UserName[256];
-    WCHAR Domain[256];
+    WCHAR DomainName[256];
     WCHAR Password[256];
     SYSTEMTIME LogonTime;
     HANDLE UserToken;