https://git.reactos.org/?p=reactos.git;a=commitdiff;h=d4b638d7c8f99c4d96c7f…
commit d4b638d7c8f99c4d96c7fd29dc199dbf275fa5d3
Author: Eric Kohl <eric.kohl(a)reactos.org>
AuthorDate: Sat Mar 23 20:57:02 2019 +0100
Commit: Eric Kohl <eric.kohl(a)reactos.org>
CommitDate: Sat Mar 23 20:58:03 2019 +0100
[SYSDM] Simplify AddUserProfile() by using fixed size buffers for account and domain
names and handle unknown and deleted accounts properly. Also fix fonts for asian
languages.
---
dll/cpl/sysdm/lang/bg-BG.rc | 2 ++
dll/cpl/sysdm/lang/cs-CZ.rc | 2 ++
dll/cpl/sysdm/lang/da-DK.rc | 2 ++
dll/cpl/sysdm/lang/de-DE.rc | 2 ++
dll/cpl/sysdm/lang/el-GR.rc | 2 ++
dll/cpl/sysdm/lang/en-US.rc | 2 ++
dll/cpl/sysdm/lang/es-ES.rc | 2 ++
dll/cpl/sysdm/lang/fr-FR.rc | 2 ++
dll/cpl/sysdm/lang/he-IL.rc | 2 ++
dll/cpl/sysdm/lang/hu-HU.rc | 2 ++
dll/cpl/sysdm/lang/id-ID.rc | 2 ++
dll/cpl/sysdm/lang/it-IT.rc | 2 ++
dll/cpl/sysdm/lang/ja-JP.rc | 6 +++--
dll/cpl/sysdm/lang/nl-NL.rc | 2 ++
dll/cpl/sysdm/lang/no-NO.rc | 2 ++
dll/cpl/sysdm/lang/pl-PL.rc | 2 ++
dll/cpl/sysdm/lang/ro-RO.rc | 2 ++
dll/cpl/sysdm/lang/ru-RU.rc | 2 ++
dll/cpl/sysdm/lang/sk-SK.rc | 2 ++
dll/cpl/sysdm/lang/sq-AL.rc | 2 ++
dll/cpl/sysdm/lang/sv-SE.rc | 2 ++
dll/cpl/sysdm/lang/tr-TR.rc | 2 ++
dll/cpl/sysdm/lang/uk-UA.rc | 2 ++
dll/cpl/sysdm/lang/zh-CN.rc | 4 ++-
dll/cpl/sysdm/lang/zh-TW.rc | 6 +++--
dll/cpl/sysdm/resource.h | 4 ++-
dll/cpl/sysdm/userprofile.c | 66 +++++++++++++++++++--------------------------
27 files changed, 86 insertions(+), 44 deletions(-)
diff --git a/dll/cpl/sysdm/lang/bg-BG.rc b/dll/cpl/sysdm/lang/bg-BG.rc
index c25f67c14d..baede2efb2 100644
--- a/dll/cpl/sysdm/lang/bg-BG.rc
+++ b/dll/cpl/sysdm/lang/bg-BG.rc
@@ -312,6 +312,8 @@ BEGIN
IDS_USERPROFILE_MANDATORY "Mandatory"
IDS_USERPROFILE_CONFIRM_DELETE "Are you sure you want to delete %s's
profile?"
IDS_USERPROFILE_CONFIRM_DELETE_TITLE "Confirm Delete"
+ IDS_USERPROFILE_ACCOUNT_UNKNOWN "Account Unknown"
+ IDS_USERPROFILE_ACCOUNT_DELETED "Account Deleted"
IDS_USERPROFILE_TYPE_TEXT "When %s logs onto this computer, should the operating
system use the roaming profile or just the locally cached copy of the roaming
profile."
IDS_MESSAGEBOXTITLE "Приложение за таблото за управление на уредбата"
IDS_WARNINITIALSIZE "Въведете числена стойност за началния размер на страниращия
файл."
diff --git a/dll/cpl/sysdm/lang/cs-CZ.rc b/dll/cpl/sysdm/lang/cs-CZ.rc
index 72d1da8bc4..da662b1553 100644
--- a/dll/cpl/sysdm/lang/cs-CZ.rc
+++ b/dll/cpl/sysdm/lang/cs-CZ.rc
@@ -317,6 +317,8 @@ BEGIN
IDS_USERPROFILE_MANDATORY "Mandatory"
IDS_USERPROFILE_CONFIRM_DELETE "Are you sure you want to delete %s's
profile?"
IDS_USERPROFILE_CONFIRM_DELETE_TITLE "Confirm Delete"
+ IDS_USERPROFILE_ACCOUNT_UNKNOWN "Account Unknown"
+ IDS_USERPROFILE_ACCOUNT_DELETED "Account Deleted"
IDS_USERPROFILE_TYPE_TEXT "When %s logs onto this computer, should the operating
system use the roaming profile or just the locally cached copy of the roaming
profile."
IDS_MESSAGEBOXTITLE "Systémový aplet kontrolních panelů"
IDS_WARNINITIALSIZE "Zadejte číselnou hodnotu pro počáteční velikost
stránkovacího souboru."
diff --git a/dll/cpl/sysdm/lang/da-DK.rc b/dll/cpl/sysdm/lang/da-DK.rc
index 4648fb3b76..1aae2813cc 100644
--- a/dll/cpl/sysdm/lang/da-DK.rc
+++ b/dll/cpl/sysdm/lang/da-DK.rc
@@ -312,6 +312,8 @@ BEGIN
IDS_USERPROFILE_MANDATORY "Mandatory"
IDS_USERPROFILE_CONFIRM_DELETE "Are you sure you want to delete %s's
profile?"
IDS_USERPROFILE_CONFIRM_DELETE_TITLE "Confirm Delete"
+ IDS_USERPROFILE_ACCOUNT_UNKNOWN "Account Unknown"
+ IDS_USERPROFILE_ACCOUNT_DELETED "Account Deleted"
IDS_USERPROFILE_TYPE_TEXT "When %s logs onto this computer, should the operating
system use the roaming profile or just the locally cached copy of the roaming
profile."
IDS_MESSAGEBOXTITLE "System control panel applet"
IDS_WARNINITIALSIZE "Enter a numeric value for the initial size of the paging
file."
diff --git a/dll/cpl/sysdm/lang/de-DE.rc b/dll/cpl/sysdm/lang/de-DE.rc
index 5d2c476410..a1cddac197 100644
--- a/dll/cpl/sysdm/lang/de-DE.rc
+++ b/dll/cpl/sysdm/lang/de-DE.rc
@@ -321,6 +321,8 @@ BEGIN
IDS_USERPROFILE_MANDATORY "Obligatorisch"
IDS_USERPROFILE_CONFIRM_DELETE "Soll das Profil für folgenden Benutzer gelöscht
werden: %s?"
IDS_USERPROFILE_CONFIRM_DELETE_TITLE "Löschen bestätigen"
+ IDS_USERPROFILE_ACCOUNT_UNKNOWN "Konto unbekannt"
+ IDS_USERPROFILE_ACCOUNT_DELETED "Konto gelöscht"
IDS_USERPROFILE_TYPE_TEXT "Soll das servergespeicherte Profil oder die lokal
gespeicherte Kopie davon vom Betriebssystem verwendet werden, wenn sich %s am Computer
anmeldet?"
IDS_MESSAGEBOXTITLE "Systemsteuerungsoption
""System"""
IDS_WARNINITIALSIZE "Geben Sie einen numerischen Wert für die Anfangsgröße der
Auslagerungsdatei an."
diff --git a/dll/cpl/sysdm/lang/el-GR.rc b/dll/cpl/sysdm/lang/el-GR.rc
index dd802367d0..8b1ac79e06 100644
--- a/dll/cpl/sysdm/lang/el-GR.rc
+++ b/dll/cpl/sysdm/lang/el-GR.rc
@@ -312,6 +312,8 @@ BEGIN
IDS_USERPROFILE_MANDATORY "Mandatory"
IDS_USERPROFILE_CONFIRM_DELETE "Are you sure you want to delete %s's
profile?"
IDS_USERPROFILE_CONFIRM_DELETE_TITLE "Confirm Delete"
+ IDS_USERPROFILE_ACCOUNT_UNKNOWN "Account Unknown"
+ IDS_USERPROFILE_ACCOUNT_DELETED "Account Deleted"
IDS_USERPROFILE_TYPE_TEXT "When %s logs onto this computer, should the operating
system use the roaming profile or just the locally cached copy of the roaming
profile."
IDS_MESSAGEBOXTITLE "System control panel applet"
IDS_WARNINITIALSIZE "Enter a numeric value for the initial size of the paging
file."
diff --git a/dll/cpl/sysdm/lang/en-US.rc b/dll/cpl/sysdm/lang/en-US.rc
index caff09b781..4d75aa16f3 100644
--- a/dll/cpl/sysdm/lang/en-US.rc
+++ b/dll/cpl/sysdm/lang/en-US.rc
@@ -312,6 +312,8 @@ BEGIN
IDS_USERPROFILE_MANDATORY "Mandatory"
IDS_USERPROFILE_CONFIRM_DELETE "Are you sure you want to delete %s's
profile?"
IDS_USERPROFILE_CONFIRM_DELETE_TITLE "Confirm Delete"
+ IDS_USERPROFILE_ACCOUNT_UNKNOWN "Account Unknown"
+ IDS_USERPROFILE_ACCOUNT_DELETED "Account Deleted"
IDS_USERPROFILE_TYPE_TEXT "When %s logs onto this computer, should the operating
system use the roaming profile or just the locally cached copy of the roaming
profile."
IDS_MESSAGEBOXTITLE "System control panel applet"
IDS_WARNINITIALSIZE "Enter a numeric value for the initial size of the paging
file."
diff --git a/dll/cpl/sysdm/lang/es-ES.rc b/dll/cpl/sysdm/lang/es-ES.rc
index 9beb41e188..89c773a83b 100644
--- a/dll/cpl/sysdm/lang/es-ES.rc
+++ b/dll/cpl/sysdm/lang/es-ES.rc
@@ -314,6 +314,8 @@ BEGIN
IDS_USERPROFILE_MANDATORY "Mandatory"
IDS_USERPROFILE_CONFIRM_DELETE "Are you sure you want to delete %s's
profile?"
IDS_USERPROFILE_CONFIRM_DELETE_TITLE "Confirm Delete"
+ IDS_USERPROFILE_ACCOUNT_UNKNOWN "Account Unknown"
+ IDS_USERPROFILE_ACCOUNT_DELETED "Account Deleted"
IDS_USERPROFILE_TYPE_TEXT "When %s logs onto this computer, should the operating
system use the roaming profile or just the locally cached copy of the roaming
profile."
IDS_MESSAGEBOXTITLE "Applet de sistema del Panel de control"
IDS_WARNINITIALSIZE "Introduzca el tamaño inicial del archivo de
paginación."
diff --git a/dll/cpl/sysdm/lang/fr-FR.rc b/dll/cpl/sysdm/lang/fr-FR.rc
index d796e0e972..db30145b1c 100644
--- a/dll/cpl/sysdm/lang/fr-FR.rc
+++ b/dll/cpl/sysdm/lang/fr-FR.rc
@@ -312,6 +312,8 @@ BEGIN
IDS_USERPROFILE_MANDATORY "Mandatory"
IDS_USERPROFILE_CONFIRM_DELETE "Are you sure you want to delete %s's
profile?"
IDS_USERPROFILE_CONFIRM_DELETE_TITLE "Confirm Delete"
+ IDS_USERPROFILE_ACCOUNT_UNKNOWN "Account Unknown"
+ IDS_USERPROFILE_ACCOUNT_DELETED "Account Deleted"
IDS_USERPROFILE_TYPE_TEXT "When %s logs onto this computer, should the operating
system use the roaming profile or just the locally cached copy of the roaming
profile."
IDS_MESSAGEBOXTITLE "System control panel applet"
IDS_WARNINITIALSIZE "Entrez une valeur numérique pour la taille initiale du
fichier d'échange."
diff --git a/dll/cpl/sysdm/lang/he-IL.rc b/dll/cpl/sysdm/lang/he-IL.rc
index 78e56c22f4..16fd5388f1 100644
--- a/dll/cpl/sysdm/lang/he-IL.rc
+++ b/dll/cpl/sysdm/lang/he-IL.rc
@@ -314,6 +314,8 @@ BEGIN
IDS_USERPROFILE_MANDATORY "Mandatory"
IDS_USERPROFILE_CONFIRM_DELETE "Are you sure you want to delete %s's
profile?"
IDS_USERPROFILE_CONFIRM_DELETE_TITLE "Confirm Delete"
+ IDS_USERPROFILE_ACCOUNT_UNKNOWN "Account Unknown"
+ IDS_USERPROFILE_ACCOUNT_DELETED "Account Deleted"
IDS_USERPROFILE_TYPE_TEXT "When %s logs onto this computer, should the operating
system use the roaming profile or just the locally cached copy of the roaming
profile."
IDS_MESSAGEBOXTITLE "System control panel applet"
IDS_WARNINITIALSIZE "Enter a numeric value for the initial size of the paging
file."
diff --git a/dll/cpl/sysdm/lang/hu-HU.rc b/dll/cpl/sysdm/lang/hu-HU.rc
index 2d250b5039..99e02ffc9c 100644
--- a/dll/cpl/sysdm/lang/hu-HU.rc
+++ b/dll/cpl/sysdm/lang/hu-HU.rc
@@ -314,6 +314,8 @@ BEGIN
IDS_USERPROFILE_MANDATORY "Mandatory"
IDS_USERPROFILE_CONFIRM_DELETE "Are you sure you want to delete %s's
profile?"
IDS_USERPROFILE_CONFIRM_DELETE_TITLE "Confirm Delete"
+ IDS_USERPROFILE_ACCOUNT_UNKNOWN "Account Unknown"
+ IDS_USERPROFILE_ACCOUNT_DELETED "Account Deleted"
IDS_USERPROFILE_TYPE_TEXT "When %s logs onto this computer, should the operating
system use the roaming profile or just the locally cached copy of the roaming
profile."
IDS_MESSAGEBOXTITLE "System control panel applet"
IDS_WARNINITIALSIZE "Enter a numeric value for the initial size of the paging
file."
diff --git a/dll/cpl/sysdm/lang/id-ID.rc b/dll/cpl/sysdm/lang/id-ID.rc
index 8183a238d2..d873b96055 100644
--- a/dll/cpl/sysdm/lang/id-ID.rc
+++ b/dll/cpl/sysdm/lang/id-ID.rc
@@ -312,6 +312,8 @@ BEGIN
IDS_USERPROFILE_MANDATORY "Mandatory"
IDS_USERPROFILE_CONFIRM_DELETE "Are you sure you want to delete %s's
profile?"
IDS_USERPROFILE_CONFIRM_DELETE_TITLE "Confirm Delete"
+ IDS_USERPROFILE_ACCOUNT_UNKNOWN "Account Unknown"
+ IDS_USERPROFILE_ACCOUNT_DELETED "Account Deleted"
IDS_USERPROFILE_TYPE_TEXT "When %s logs onto this computer, should the operating
system use the roaming profile or just the locally cached copy of the roaming
profile."
IDS_MESSAGEBOXTITLE "System control panel applet"
IDS_WARNINITIALSIZE "Enter a numeric value for the initial size of the paging
file."
diff --git a/dll/cpl/sysdm/lang/it-IT.rc b/dll/cpl/sysdm/lang/it-IT.rc
index 250ff55d72..33a0fe8bd9 100644
--- a/dll/cpl/sysdm/lang/it-IT.rc
+++ b/dll/cpl/sysdm/lang/it-IT.rc
@@ -312,6 +312,8 @@ BEGIN
IDS_USERPROFILE_MANDATORY "Mandatory"
IDS_USERPROFILE_CONFIRM_DELETE "Are you sure you want to delete %s's
profile?"
IDS_USERPROFILE_CONFIRM_DELETE_TITLE "Confirm Delete"
+ IDS_USERPROFILE_ACCOUNT_UNKNOWN "Account Unknown"
+ IDS_USERPROFILE_ACCOUNT_DELETED "Account Deleted"
IDS_USERPROFILE_TYPE_TEXT "When %s logs onto this computer, should the operating
system use the roaming profile or just the locally cached copy of the roaming
profile."
IDS_MESSAGEBOXTITLE "Applet di sistema del pannello di controllo"
IDS_WARNINITIALSIZE "Immettere la dimensione iniziale del file di paging."
diff --git a/dll/cpl/sysdm/lang/ja-JP.rc b/dll/cpl/sysdm/lang/ja-JP.rc
index c39afee09e..5eadab04e6 100644
--- a/dll/cpl/sysdm/lang/ja-JP.rc
+++ b/dll/cpl/sysdm/lang/ja-JP.rc
@@ -103,7 +103,7 @@ END
IDD_HARDWAREPROFILE DIALOGEX 0, 0, 212, 188
STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_VISIBLE | WS_CAPTION
| WS_SYSMENU
CAPTION "General"
-FONT 8, "MS Shell Dlg"
+FONT 9, "MS UI Gothic"
BEGIN
ICON IDI_HARDPROF, IDC_STATIC, 10, 10, 18, 20, SS_ICON
LTEXT "", IDC_HWPPROP_PROFILE, 48, 16, 150, 8
@@ -168,7 +168,7 @@ END
IDD_USERPROFILE_TYPE DIALOGEX 0, 0, 225, 103
STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_VISIBLE | WS_CAPTION
| WS_SYSMENU
CAPTION "Change Profile Type"
-FONT 8, "MS Shell Dlg"
+FONT 9, "MS UI Gothic"
BEGIN
LTEXT "", IDC_USERPROFILE_TYPE_TEXT, 7, 11, 206, 28
AUTORADIOBUTTON "&Roaming profile", IDC_USERPROFILE_TYPE_ROAMING, 60,
49, 145, 10
@@ -312,6 +312,8 @@ BEGIN
IDS_USERPROFILE_MANDATORY "Mandatory"
IDS_USERPROFILE_CONFIRM_DELETE "Are you sure you want to delete %s's
profile?"
IDS_USERPROFILE_CONFIRM_DELETE_TITLE "Confirm Delete"
+ IDS_USERPROFILE_ACCOUNT_UNKNOWN "Account Unknown"
+ IDS_USERPROFILE_ACCOUNT_DELETED "Account Deleted"
IDS_USERPROFILE_TYPE_TEXT "When %s logs onto this computer, should the operating
system use the roaming profile or just the locally cached copy of the roaming
profile."
IDS_MESSAGEBOXTITLE "System control panel applet"
IDS_WARNINITIALSIZE "Enter a numeric value for the initial size of the paging
file."
diff --git a/dll/cpl/sysdm/lang/nl-NL.rc b/dll/cpl/sysdm/lang/nl-NL.rc
index 9dbdee3c3e..7a39ea7d5b 100644
--- a/dll/cpl/sysdm/lang/nl-NL.rc
+++ b/dll/cpl/sysdm/lang/nl-NL.rc
@@ -312,6 +312,8 @@ BEGIN
IDS_USERPROFILE_MANDATORY "Mandatory"
IDS_USERPROFILE_CONFIRM_DELETE "Are you sure you want to delete %s's
profile?"
IDS_USERPROFILE_CONFIRM_DELETE_TITLE "Confirm Delete"
+ IDS_USERPROFILE_ACCOUNT_UNKNOWN "Account Unknown"
+ IDS_USERPROFILE_ACCOUNT_DELETED "Account Deleted"
IDS_USERPROFILE_TYPE_TEXT "When %s logs onto this computer, should the operating
system use the roaming profile or just the locally cached copy of the roaming
profile."
IDS_MESSAGEBOXTITLE "System control panel applet"
IDS_WARNINITIALSIZE "Enter a numeric value for the initial size of the paging
file."
diff --git a/dll/cpl/sysdm/lang/no-NO.rc b/dll/cpl/sysdm/lang/no-NO.rc
index ef3c145d44..6fb3d8a3b0 100644
--- a/dll/cpl/sysdm/lang/no-NO.rc
+++ b/dll/cpl/sysdm/lang/no-NO.rc
@@ -312,6 +312,8 @@ BEGIN
IDS_USERPROFILE_MANDATORY "Mandatory"
IDS_USERPROFILE_CONFIRM_DELETE "Are you sure you want to delete %s's
profile?"
IDS_USERPROFILE_CONFIRM_DELETE_TITLE "Confirm Delete"
+ IDS_USERPROFILE_ACCOUNT_UNKNOWN "Account Unknown"
+ IDS_USERPROFILE_ACCOUNT_DELETED "Account Deleted"
IDS_USERPROFILE_TYPE_TEXT "When %s logs onto this computer, should the operating
system use the roaming profile or just the locally cached copy of the roaming
profile."
IDS_MESSAGEBOXTITLE "System control panel applet"
IDS_WARNINITIALSIZE "Enter a numeric value for the initial size of the paging
file."
diff --git a/dll/cpl/sysdm/lang/pl-PL.rc b/dll/cpl/sysdm/lang/pl-PL.rc
index f94c295792..30d148c90a 100644
--- a/dll/cpl/sysdm/lang/pl-PL.rc
+++ b/dll/cpl/sysdm/lang/pl-PL.rc
@@ -321,6 +321,8 @@ BEGIN
IDS_USERPROFILE_MANDATORY "Mandatory"
IDS_USERPROFILE_CONFIRM_DELETE "Are you sure you want to delete %s's
profile?"
IDS_USERPROFILE_CONFIRM_DELETE_TITLE "Confirm Delete"
+ IDS_USERPROFILE_ACCOUNT_UNKNOWN "Account Unknown"
+ IDS_USERPROFILE_ACCOUNT_DELETED "Account Deleted"
IDS_USERPROFILE_TYPE_TEXT "When %s logs onto this computer, should the operating
system use the roaming profile or just the locally cached copy of the roaming
profile."
IDS_MESSAGEBOXTITLE "System"
IDS_WARNINITIALSIZE "Wprowadź wielkość dla początkowego rozmiaru pliku
stronicowania."
diff --git a/dll/cpl/sysdm/lang/ro-RO.rc b/dll/cpl/sysdm/lang/ro-RO.rc
index e269094e5e..d08ddee186 100644
--- a/dll/cpl/sysdm/lang/ro-RO.rc
+++ b/dll/cpl/sysdm/lang/ro-RO.rc
@@ -321,6 +321,8 @@ BEGIN
IDS_USERPROFILE_MANDATORY "Mandatory"
IDS_USERPROFILE_CONFIRM_DELETE "Are you sure you want to delete %s's
profile?"
IDS_USERPROFILE_CONFIRM_DELETE_TITLE "Confirm Delete"
+ IDS_USERPROFILE_ACCOUNT_UNKNOWN "Account Unknown"
+ IDS_USERPROFILE_ACCOUNT_DELETED "Account Deleted"
IDS_USERPROFILE_TYPE_TEXT "When %s logs onto this computer, should the operating
system use the roaming profile or just the locally cached copy of the roaming
profile."
IDS_MESSAGEBOXTITLE "Specificare valori de sistem"
IDS_WARNINITIALSIZE "Introduceți o valoare numerică pentru dimensiunea inițială
a fișierului de paginare."
diff --git a/dll/cpl/sysdm/lang/ru-RU.rc b/dll/cpl/sysdm/lang/ru-RU.rc
index 217886d815..87b7e95fab 100644
--- a/dll/cpl/sysdm/lang/ru-RU.rc
+++ b/dll/cpl/sysdm/lang/ru-RU.rc
@@ -312,6 +312,8 @@ BEGIN
IDS_USERPROFILE_MANDATORY "Обязательный"
IDS_USERPROFILE_CONFIRM_DELETE "Вы действительно хотите удалить профиль
пользователя %s?"
IDS_USERPROFILE_CONFIRM_DELETE_TITLE "Подтверждение удаления"
+ IDS_USERPROFILE_ACCOUNT_UNKNOWN "Account Unknown"
+ IDS_USERPROFILE_ACCOUNT_DELETED "Account Deleted"
IDS_USERPROFILE_TYPE_TEXT "When %s logs onto this computer, should the operating
system use the roaming profile or just the locally cached copy of the roaming
profile."
IDS_MESSAGEBOXTITLE "Панель управления системы"
IDS_WARNINITIALSIZE "Введите числовое значение исходного размера файла
подкачки."
diff --git a/dll/cpl/sysdm/lang/sk-SK.rc b/dll/cpl/sysdm/lang/sk-SK.rc
index afb21f9750..6e77a82f65 100644
--- a/dll/cpl/sysdm/lang/sk-SK.rc
+++ b/dll/cpl/sysdm/lang/sk-SK.rc
@@ -320,6 +320,8 @@ BEGIN
IDS_USERPROFILE_MANDATORY "Mandatory"
IDS_USERPROFILE_CONFIRM_DELETE "Are you sure you want to delete %s's
profile?"
IDS_USERPROFILE_CONFIRM_DELETE_TITLE "Confirm Delete"
+ IDS_USERPROFILE_ACCOUNT_UNKNOWN "Account Unknown"
+ IDS_USERPROFILE_ACCOUNT_DELETED "Account Deleted"
IDS_USERPROFILE_TYPE_TEXT "When %s logs onto this computer, should the operating
system use the roaming profile or just the locally cached copy of the roaming
profile."
IDS_MESSAGEBOXTITLE "System control panel applet"
IDS_WARNINITIALSIZE "Enter a numeric value for the initial size of the paging
file."
diff --git a/dll/cpl/sysdm/lang/sq-AL.rc b/dll/cpl/sysdm/lang/sq-AL.rc
index ecaabd00f0..9bf0b6f710 100644
--- a/dll/cpl/sysdm/lang/sq-AL.rc
+++ b/dll/cpl/sysdm/lang/sq-AL.rc
@@ -312,6 +312,8 @@ BEGIN
IDS_USERPROFILE_MANDATORY "Mandatory"
IDS_USERPROFILE_CONFIRM_DELETE "Are you sure you want to delete %s's
profile?"
IDS_USERPROFILE_CONFIRM_DELETE_TITLE "Confirm Delete"
+ IDS_USERPROFILE_ACCOUNT_UNKNOWN "Account Unknown"
+ IDS_USERPROFILE_ACCOUNT_DELETED "Account Deleted"
IDS_USERPROFILE_TYPE_TEXT "When %s logs onto this computer, should the operating
system use the roaming profile or just the locally cached copy of the roaming
profile."
IDS_MESSAGEBOXTITLE "Sistemi i kontrollit panelit programeve"
IDS_WARNINITIALSIZE "Futni një vlerë numerike për madhësinë fillestare e faqeve
të dokumentave."
diff --git a/dll/cpl/sysdm/lang/sv-SE.rc b/dll/cpl/sysdm/lang/sv-SE.rc
index 5559dd4659..ba6975fd19 100644
--- a/dll/cpl/sysdm/lang/sv-SE.rc
+++ b/dll/cpl/sysdm/lang/sv-SE.rc
@@ -314,6 +314,8 @@ BEGIN
IDS_USERPROFILE_MANDATORY "Mandatory"
IDS_USERPROFILE_CONFIRM_DELETE "Are you sure you want to delete %s's
profile?"
IDS_USERPROFILE_CONFIRM_DELETE_TITLE "Confirm Delete"
+ IDS_USERPROFILE_ACCOUNT_UNKNOWN "Account Unknown"
+ IDS_USERPROFILE_ACCOUNT_DELETED "Account Deleted"
IDS_USERPROFILE_TYPE_TEXT "When %s logs onto this computer, should the operating
system use the roaming profile or just the locally cached copy of the roaming
profile."
IDS_MESSAGEBOXTITLE "System control panel applet"
IDS_WARNINITIALSIZE "Enter a numeric value for the initial size of the paging
file."
diff --git a/dll/cpl/sysdm/lang/tr-TR.rc b/dll/cpl/sysdm/lang/tr-TR.rc
index 3ee8505bdc..34373a7d29 100644
--- a/dll/cpl/sysdm/lang/tr-TR.rc
+++ b/dll/cpl/sysdm/lang/tr-TR.rc
@@ -314,6 +314,8 @@ BEGIN
IDS_USERPROFILE_MANDATORY "Mandatory"
IDS_USERPROFILE_CONFIRM_DELETE "Are you sure you want to delete %s's
profile?"
IDS_USERPROFILE_CONFIRM_DELETE_TITLE "Confirm Delete"
+ IDS_USERPROFILE_ACCOUNT_UNKNOWN "Account Unknown"
+ IDS_USERPROFILE_ACCOUNT_DELETED "Account Deleted"
IDS_USERPROFILE_TYPE_TEXT "When %s logs onto this computer, should the operating
system use the roaming profile or just the locally cached copy of the roaming
profile."
IDS_MESSAGEBOXTITLE "Dizge Denetim Masası Uygulaması"
IDS_WARNINITIALSIZE "Sayfalama kütüğünün başlangıç büyüklüğü için bir sayılık
değer giriniz."
diff --git a/dll/cpl/sysdm/lang/uk-UA.rc b/dll/cpl/sysdm/lang/uk-UA.rc
index fc856bef26..2680bc4de2 100644
--- a/dll/cpl/sysdm/lang/uk-UA.rc
+++ b/dll/cpl/sysdm/lang/uk-UA.rc
@@ -320,6 +320,8 @@ BEGIN
IDS_USERPROFILE_MANDATORY "Обов'язковий"
IDS_USERPROFILE_CONFIRM_DELETE "Ви дійсно хочете видалити профіль %s?"
IDS_USERPROFILE_CONFIRM_DELETE_TITLE "Підтвердження видалення"
+ IDS_USERPROFILE_ACCOUNT_UNKNOWN "Account Unknown"
+ IDS_USERPROFILE_ACCOUNT_DELETED "Account Deleted"
IDS_USERPROFILE_TYPE_TEXT "When %s logs onto this computer, should the operating
system use the roaming profile or just the locally cached copy of the roaming
profile."
IDS_MESSAGEBOXTITLE "Елемент панелі керування"
IDS_WARNINITIALSIZE "Введіть числове значення для початкового розміру файлу
довантаження."
diff --git a/dll/cpl/sysdm/lang/zh-CN.rc b/dll/cpl/sysdm/lang/zh-CN.rc
index fbe20505f1..31655dc24c 100644
--- a/dll/cpl/sysdm/lang/zh-CN.rc
+++ b/dll/cpl/sysdm/lang/zh-CN.rc
@@ -171,7 +171,7 @@ END
IDD_USERPROFILE_TYPE DIALOGEX 0, 0, 225, 103
STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_VISIBLE | WS_CAPTION
| WS_SYSMENU
CAPTION "Change Profile Type"
-FONT 8, "MS Shell Dlg"
+FONT 9, "宋体"
BEGIN
LTEXT "", IDC_USERPROFILE_TYPE_TEXT, 7, 11, 206, 28
AUTORADIOBUTTON "&Roaming profile", IDC_USERPROFILE_TYPE_ROAMING, 60,
49, 145, 10
@@ -315,6 +315,8 @@ BEGIN
IDS_USERPROFILE_MANDATORY "Mandatory"
IDS_USERPROFILE_CONFIRM_DELETE "Are you sure you want to delete %s's
profile?"
IDS_USERPROFILE_CONFIRM_DELETE_TITLE "Confirm Delete"
+ IDS_USERPROFILE_ACCOUNT_UNKNOWN "Account Unknown"
+ IDS_USERPROFILE_ACCOUNT_DELETED "Account Deleted"
IDS_USERPROFILE_TYPE_TEXT "When %s logs onto this computer, should the operating
system use the roaming profile or just the locally cached copy of the roaming
profile."
IDS_MESSAGEBOXTITLE "系统控制面板小程序"
IDS_WARNINITIALSIZE "为分页文件的初始大小输入一个数字值。"
diff --git a/dll/cpl/sysdm/lang/zh-TW.rc b/dll/cpl/sysdm/lang/zh-TW.rc
index cb3517923e..c47d483a7f 100644
--- a/dll/cpl/sysdm/lang/zh-TW.rc
+++ b/dll/cpl/sysdm/lang/zh-TW.rc
@@ -106,7 +106,7 @@ END
IDD_HARDWAREPROFILE DIALOGEX 0, 0, 212, 188
STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_VISIBLE | WS_CAPTION
| WS_SYSMENU
CAPTION "一般"
-FONT 8, "新細明體"
+FONT 9, "新細明體"
BEGIN
ICON IDI_HARDPROF, IDC_STATIC, 10, 10, 18, 20, SS_ICON
LTEXT "", IDC_HWPPROP_PROFILE, 48, 16, 150, 8
@@ -171,7 +171,7 @@ END
IDD_USERPROFILE_TYPE DIALOGEX 0, 0, 225, 103
STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_VISIBLE | WS_CAPTION
| WS_SYSMENU
CAPTION "Change Profile Type"
-FONT 8, "MS Shell Dlg"
+FONT 9, "新細明體"
BEGIN
LTEXT "", IDC_USERPROFILE_TYPE_TEXT, 7, 11, 206, 28
AUTORADIOBUTTON "&Roaming profile", IDC_USERPROFILE_TYPE_ROAMING, 60,
49, 145, 10
@@ -315,6 +315,8 @@ BEGIN
IDS_USERPROFILE_MANDATORY "Mandatory"
IDS_USERPROFILE_CONFIRM_DELETE "Are you sure you want to delete %s's
profile?"
IDS_USERPROFILE_CONFIRM_DELETE_TITLE "Confirm Delete"
+ IDS_USERPROFILE_ACCOUNT_UNKNOWN "Account Unknown"
+ IDS_USERPROFILE_ACCOUNT_DELETED "Account Deleted"
IDS_USERPROFILE_TYPE_TEXT "When %s logs onto this computer, should the operating
system use the roaming profile or just the locally cached copy of the roaming
profile."
IDS_MESSAGEBOXTITLE "系統控制面板小程序"
IDS_WARNINITIALSIZE "爲分頁文件的初始大小輸入一個數字值。"
diff --git a/dll/cpl/sysdm/resource.h b/dll/cpl/sysdm/resource.h
index 6b873702d8..6d9d22aff7 100644
--- a/dll/cpl/sysdm/resource.h
+++ b/dll/cpl/sysdm/resource.h
@@ -38,7 +38,9 @@
#define IDS_USERPROFILE_MANDATORY 79
#define IDS_USERPROFILE_CONFIRM_DELETE 80
#define IDS_USERPROFILE_CONFIRM_DELETE_TITLE 81
-#define IDS_USERPROFILE_TYPE_TEXT 82
+#define IDS_USERPROFILE_ACCOUNT_UNKNOWN 82
+#define IDS_USERPROFILE_ACCOUNT_DELETED 83
+#define IDS_USERPROFILE_TYPE_TEXT 84
#define IDS_MESSAGEBOXTITLE 100
#define IDS_WARNINITIALSIZE 101
diff --git a/dll/cpl/sysdm/userprofile.c b/dll/cpl/sysdm/userprofile.c
index 6b6c402b7a..6bdcd04e2c 100644
--- a/dll/cpl/sysdm/userprofile.c
+++ b/dll/cpl/sysdm/userprofile.c
@@ -200,8 +200,8 @@ AddUserProfile(
_In_ HKEY hProfileKey)
{
PPROFILEDATA pProfileData = NULL;
- PWSTR pszAccountName = NULL;
- PWSTR pszDomainName = NULL;
+ WCHAR szAccountName[128], szDomainName[128];
+ WCHAR szNameBuffer[256];
SID_NAME_USE Use;
DWORD dwAccountNameSize, dwDomainNameSize;
DWORD dwProfileData;
@@ -213,43 +213,39 @@ AddUserProfile(
&pSid))
return;
- dwAccountNameSize = 0;
- dwDomainNameSize = 0;
- LookupAccountSidW(NULL,
- pSid,
- NULL,
- &dwAccountNameSize,
- NULL,
- &dwDomainNameSize,
- &Use);
-
- pszDomainName = HeapAlloc(GetProcessHeap(),
- 0,
- dwDomainNameSize * sizeof(WCHAR));
- if (pszDomainName == NULL)
- goto done;
-
- pszAccountName = HeapAlloc(GetProcessHeap(),
- 0,
- dwAccountNameSize * sizeof(WCHAR));
- if (pszAccountName == NULL)
- goto done;
-
+ dwAccountNameSize = ARRAYSIZE(szAccountName);
+ dwDomainNameSize = ARRAYSIZE(szDomainName);
if (!LookupAccountSidW(NULL,
pSid,
- pszAccountName,
+ szAccountName,
&dwAccountNameSize,
- pszDomainName,
+ szDomainName,
&dwDomainNameSize,
&Use))
- goto done;
+ {
+ /* Unknown account */
+ LoadStringW(hApplet, IDS_USERPROFILE_ACCOUNT_UNKNOWN, szNameBuffer,
ARRAYSIZE(szNameBuffer));
+ }
+ else
+ {
+ /* Show only the user accounts */
+ if (Use != SidTypeUser)
+ goto done;
- /* Show only the user accounts */
- if (Use != SidTypeUser)
- goto done;
+ if (szAccountName[0] == UNICODE_NULL)
+ {
+ /* Deleted account */
+ LoadStringW(hApplet, IDS_USERPROFILE_ACCOUNT_DELETED, szNameBuffer,
ARRAYSIZE(szNameBuffer));
+ }
+ else
+ {
+ /* Normal account */
+ wsprintf(szNameBuffer, L"%s\\%s", szDomainName, szAccountName);
+ }
+ }
dwProfileData = sizeof(PROFILEDATA) +
- ((wcslen(pszDomainName) + wcslen(pszAccountName) + 2) *
sizeof(WCHAR));
+ ((wcslen(szNameBuffer) + 1) * sizeof(WCHAR));
pProfileData = HeapAlloc(GetProcessHeap(),
0,
dwProfileData);
@@ -261,7 +257,7 @@ AddUserProfile(
ptr = (PWSTR)((ULONG_PTR)pProfileData + sizeof(PROFILEDATA));
pProfileData->pszFullName = ptr;
- wsprintf(pProfileData->pszFullName, L"%s\\%s", pszDomainName,
pszAccountName);
+ wcscpy(pProfileData->pszFullName, szNameBuffer);
memset(&lvi, 0x00, sizeof(lvi));
lvi.mask = LVIF_TEXT | LVIF_STATE | LVIF_PARAM;
@@ -271,12 +267,6 @@ AddUserProfile(
ListView_InsertItem(hwndListView, &lvi);
done:
- if (pszDomainName != NULL)
- HeapFree(GetProcessHeap(), 0, pszDomainName);
-
- if (pszAccountName != NULL)
- HeapFree(GetProcessHeap(), 0, pszAccountName);
-
if (pSid != NULL)
LocalFree(pSid);
}