https://git.reactos.org/?p=reactos.git;a=commitdiff;h=3dbd44fde1487acdef673…
commit 3dbd44fde1487acdef6739486232344e59d6c4aa
Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Mon Nov 13 10:36:52 2017 +0900
input: Overwrite font substitutes settings on lang change
---
dll/cpl/input/input_list.c | 126 +++++++++++++++++++++++++++++++++++++++++-
dll/cpl/input/input_list.h | 2 +-
dll/cpl/input/lang/bg-BG.rc | 1 +
dll/cpl/input/lang/cs-CZ.rc | 1 +
dll/cpl/input/lang/de-DE.rc | 1 +
dll/cpl/input/lang/el-GR.rc | 1 +
dll/cpl/input/lang/en-US.rc | 1 +
dll/cpl/input/lang/es-ES.rc | 1 +
dll/cpl/input/lang/fr-FR.rc | 1 +
dll/cpl/input/lang/he-IL.rc | 1 +
dll/cpl/input/lang/it-IT.rc | 1 +
dll/cpl/input/lang/ja-JP.rc | 1 +
dll/cpl/input/lang/no-NO.rc | 1 +
dll/cpl/input/lang/pl-PL.rc | 1 +
dll/cpl/input/lang/pt-BR.rc | 1 +
dll/cpl/input/lang/ro-RO.rc | 1 +
dll/cpl/input/lang/ru-RU.rc | 1 +
dll/cpl/input/lang/sk-SK.rc | 1 +
dll/cpl/input/lang/sq-AL.rc | 1 +
dll/cpl/input/lang/tr-TR.rc | 1 +
dll/cpl/input/lang/uk-UA.rc | 1 +
dll/cpl/input/lang/zh-CN.rc | 1 +
dll/cpl/input/lang/zh-TW.rc | 1 +
dll/cpl/input/resource.h | 1 +
dll/cpl/input/settings_page.c | 44 ++++++++++++++-
25 files changed, 189 insertions(+), 5 deletions(-)
diff --git a/dll/cpl/input/input_list.c b/dll/cpl/input/input_list.c
index 0d9718d7e7..1de3246af1 100644
--- a/dll/cpl/input/input_list.c
+++ b/dll/cpl/input/input_list.c
@@ -2,11 +2,129 @@
* PROJECT: input.dll
* FILE: dll/cpl/input/input_list.c
* PURPOSE: input.dll
-* PROGRAMMER: Dmitry Chapyshev (dmitry(a)reactos.org)
+* PROGRAMMERS: Dmitry Chapyshev (dmitry(a)reactos.org)
+* Katayama Hirofumi MZ (katayama.hirofumi.mz(a)gmail.com)
*/
#include "input_list.h"
+typedef struct
+{
+ PWCHAR FontName;
+ PWCHAR SubFontName;
+} MUI_SUBFONT;
+
+#include "../../../base/setup/usetup/muifonts.h"
+
+BOOL UpdateRegistryForFontSubstitutes(MUI_SUBFONT *pSubstitutes)
+{
+ DWORD cbData;
+ HKEY hKey;
+ static const WCHAR pszKey[] =
+ L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\FontSubstitutes";
+
+ hKey = NULL;
+ RegOpenKeyExW(HKEY_LOCAL_MACHINE, pszKey, 0, KEY_ALL_ACCESS, &hKey);
+ if (hKey == NULL)
+ return FALSE;
+
+ /* Overwrite only */
+ for (; pSubstitutes->FontName; ++pSubstitutes)
+ {
+ cbData = (lstrlenW(pSubstitutes->SubFontName) + 1) * sizeof(WCHAR);
+ RegSetValueExW(hKey, pSubstitutes->FontName, 0,
+ REG_SZ, (LPBYTE)pSubstitutes->SubFontName, cbData);
+ }
+
+ RegCloseKey(hKey);
+
+ return TRUE;
+}
+
+BOOL
+InputList_SetFontSubstitutes(LCID dwLocaleId)
+{
+ MUI_SUBFONT *pSubstitutes;
+ WORD wLangID, wPrimaryLangID, wSubLangID;
+
+ wLangID = LANGIDFROMLCID(dwLocaleId);
+ wPrimaryLangID = PRIMARYLANGID(wLangID);
+ wSubLangID = SUBLANGID(wLangID);
+
+ /* FIXME: Add more if necessary */
+ switch (wPrimaryLangID)
+ {
+ default:
+ pSubstitutes = LatinFonts;
+ break;
+ case LANG_AZERI:
+ case LANG_BELARUSIAN:
+ case LANG_BULGARIAN:
+ case LANG_KAZAK:
+ case LANG_RUSSIAN:
+ case LANG_SERBIAN:
+ case LANG_TATAR:
+ case LANG_UKRAINIAN:
+ case LANG_UZBEK:
+ pSubstitutes = CyrillicFonts;
+ break;
+ case LANG_GREEK:
+ pSubstitutes = GreekFonts;
+ break;
+ case LANG_HEBREW:
+ pSubstitutes = HebrewFonts;
+ break;
+ case LANG_CHINESE:
+ switch (wSubLangID)
+ {
+ case SUBLANG_CHINESE_SIMPLIFIED:
+ case SUBLANG_CHINESE_SINGAPORE:
+ case SUBLANG_CHINESE_MACAU:
+ pSubstitutes = ChineseSimplifiedFonts;
+ break;
+ case SUBLANG_CHINESE_TRADITIONAL:
+ case SUBLANG_CHINESE_HONGKONG:
+ pSubstitutes = ChineseTraditionalFonts;
+ break;
+ default:
+ pSubstitutes = NULL;
+ DebugBreak();
+ break;
+ }
+ break;
+ case LANG_JAPANESE:
+ pSubstitutes = JapaneseFonts;
+ break;
+ case LANG_KOREAN:
+ pSubstitutes = KoreanFonts;
+ break;
+ case LANG_ARABIC:
+ case LANG_ARMENIAN:
+ case LANG_BENGALI:
+ case LANG_FARSI:
+ case LANG_GEORGIAN:
+ case LANG_GUJARATI:
+ case LANG_HINDI:
+ case LANG_KONKANI:
+ case LANG_MARATHI:
+ case LANG_PUNJABI:
+ case LANG_SANSKRIT:
+ case LANG_TAMIL:
+ case LANG_TELUGU:
+ case LANG_THAI:
+ case LANG_URDU:
+ case LANG_VIETNAMESE:
+ pSubstitutes = UnicodeFonts;
+ break;
+ }
+
+ if (pSubstitutes)
+ {
+ UpdateRegistryForFontSubstitutes(pSubstitutes);
+ return TRUE;
+ }
+ return FALSE;
+}
static INPUT_LIST_NODE *_InputList = NULL;
@@ -216,11 +334,12 @@ InputList_AddInputMethodToUserRegistry(DWORD dwIndex,
INPUT_LIST_NODE *pNode)
/*
* Writes any changes in input methods to the registry
*/
-VOID
+BOOL
InputList_Process(VOID)
{
INPUT_LIST_NODE *pCurrent;
DWORD dwIndex;
+ BOOL bRet = FALSE;
/* Process deleted and edited input methods */
for (pCurrent = _InputList; pCurrent != NULL; pCurrent = pCurrent->pNext)
@@ -246,6 +365,7 @@ InputList_Process(VOID)
{
if (pCurrent->wFlags & INPUT_LIST_NODE_FLAG_DEFAULT)
{
+ bRet = InputList_SetFontSubstitutes(pCurrent->pLocale->dwId);
InputList_AddInputMethodToUserRegistry(1, pCurrent);
break;
}
@@ -279,6 +399,8 @@ InputList_Process(VOID)
dwIndex++;
}
+
+ return bRet;
}
diff --git a/dll/cpl/input/input_list.h b/dll/cpl/input/input_list.h
index d2659f306d..e578cc7042 100644
--- a/dll/cpl/input/input_list.h
+++ b/dll/cpl/input/input_list.h
@@ -30,7 +30,7 @@ typedef struct _INPUT_LIST_NODE
VOID
InputList_Create(VOID);
-VOID
+BOOL
InputList_Process(VOID);
BOOL
diff --git a/dll/cpl/input/lang/bg-BG.rc b/dll/cpl/input/lang/bg-BG.rc
index 4b119fba82..97e73c536d 100644
--- a/dll/cpl/input/lang/bg-BG.rc
+++ b/dll/cpl/input/lang/bg-BG.rc
@@ -106,6 +106,7 @@ BEGIN
IDS_CTRL_SHIFT "Ctrl+Shift"
IDS_LEFT_ALT_SHIFT "Ляв Alt+Shift"
IDS_SWITCH_BET_INLANG "Превключване на езиците за въвеждане"
+ IDS_REBOOT_NOW, "Reboot now?"
END
STRINGTABLE
diff --git a/dll/cpl/input/lang/cs-CZ.rc b/dll/cpl/input/lang/cs-CZ.rc
index 8d6d8e6b3f..54e97bff60 100644
--- a/dll/cpl/input/lang/cs-CZ.rc
+++ b/dll/cpl/input/lang/cs-CZ.rc
@@ -111,6 +111,7 @@ BEGIN
IDS_CTRL_SHIFT "Ctrl+Shift"
IDS_LEFT_ALT_SHIFT "Levý Alt+Shift"
IDS_SWITCH_BET_INLANG "Přepnout mezi vstupními jazyky"
+ IDS_REBOOT_NOW, "Reboot now?"
END
STRINGTABLE
diff --git a/dll/cpl/input/lang/de-DE.rc b/dll/cpl/input/lang/de-DE.rc
index 69dd9e5492..705148ac87 100644
--- a/dll/cpl/input/lang/de-DE.rc
+++ b/dll/cpl/input/lang/de-DE.rc
@@ -106,6 +106,7 @@ BEGIN
IDS_CTRL_SHIFT "Strg+Umschalt"
IDS_LEFT_ALT_SHIFT "Alt links+Umschalt"
IDS_SWITCH_BET_INLANG "Zwischen Eingabesprachen umschalten"
+ IDS_REBOOT_NOW, "Reboot now?"
END
STRINGTABLE
diff --git a/dll/cpl/input/lang/el-GR.rc b/dll/cpl/input/lang/el-GR.rc
index 2eee60d0f6..332277b89d 100644
--- a/dll/cpl/input/lang/el-GR.rc
+++ b/dll/cpl/input/lang/el-GR.rc
@@ -106,6 +106,7 @@ BEGIN
IDS_CTRL_SHIFT "Ctrl+Shift"
IDS_LEFT_ALT_SHIFT "Left Alt+Shift"
IDS_SWITCH_BET_INLANG "Switch between input languages"
+ IDS_REBOOT_NOW, "Reboot now?"
END
STRINGTABLE
diff --git a/dll/cpl/input/lang/en-US.rc b/dll/cpl/input/lang/en-US.rc
index 8df67e0e8f..4d734791c6 100644
--- a/dll/cpl/input/lang/en-US.rc
+++ b/dll/cpl/input/lang/en-US.rc
@@ -106,6 +106,7 @@ BEGIN
IDS_CTRL_SHIFT "Ctrl+Shift"
IDS_LEFT_ALT_SHIFT "Left Alt+Shift"
IDS_SWITCH_BET_INLANG "Switch between input languages"
+ IDS_REBOOT_NOW, "Reboot now?"
END
STRINGTABLE
diff --git a/dll/cpl/input/lang/es-ES.rc b/dll/cpl/input/lang/es-ES.rc
index e18eb8ed7d..3a776808ca 100644
--- a/dll/cpl/input/lang/es-ES.rc
+++ b/dll/cpl/input/lang/es-ES.rc
@@ -108,6 +108,7 @@ BEGIN
IDS_CTRL_SHIFT "Ctrl+Mayús"
IDS_LEFT_ALT_SHIFT "Alt Izq+Mayús"
IDS_SWITCH_BET_INLANG "Cambiar entre los idiomas de entrada"
+ IDS_REBOOT_NOW, "Reboot now?"
END
STRINGTABLE
diff --git a/dll/cpl/input/lang/fr-FR.rc b/dll/cpl/input/lang/fr-FR.rc
index 96584a96d4..e8da479877 100644
--- a/dll/cpl/input/lang/fr-FR.rc
+++ b/dll/cpl/input/lang/fr-FR.rc
@@ -106,6 +106,7 @@ BEGIN
IDS_CTRL_SHIFT "Ctrl+Maj"
IDS_LEFT_ALT_SHIFT "Alt Gauche+Maj"
IDS_SWITCH_BET_INLANG "Changer les langues de saisie"
+ IDS_REBOOT_NOW, "Reboot now?"
END
/* FIXME : À améliorer/compléter */
diff --git a/dll/cpl/input/lang/he-IL.rc b/dll/cpl/input/lang/he-IL.rc
index 515b5eeefa..076ba17295 100644
--- a/dll/cpl/input/lang/he-IL.rc
+++ b/dll/cpl/input/lang/he-IL.rc
@@ -108,6 +108,7 @@ BEGIN
IDS_CTRL_SHIFT "Ctrl+Shift"
IDS_LEFT_ALT_SHIFT "Left Alt+Shift"
IDS_SWITCH_BET_INLANG "החלף בין שפות כתיבה"
+ IDS_REBOOT_NOW, "Reboot now?"
END
STRINGTABLE
diff --git a/dll/cpl/input/lang/it-IT.rc b/dll/cpl/input/lang/it-IT.rc
index bc9c07c88a..dd6314f320 100644
--- a/dll/cpl/input/lang/it-IT.rc
+++ b/dll/cpl/input/lang/it-IT.rc
@@ -106,6 +106,7 @@ BEGIN
IDS_CTRL_SHIFT "Ctrl+Shift"
IDS_LEFT_ALT_SHIFT "Alt sinistro+Shift"
IDS_SWITCH_BET_INLANG "Cambia lingua di digitazione"
+ IDS_REBOOT_NOW, "Reboot now?"
END
STRINGTABLE
diff --git a/dll/cpl/input/lang/ja-JP.rc b/dll/cpl/input/lang/ja-JP.rc
index 100f79fd8e..8952da839f 100644
--- a/dll/cpl/input/lang/ja-JP.rc
+++ b/dll/cpl/input/lang/ja-JP.rc
@@ -106,6 +106,7 @@ BEGIN
IDS_CTRL_SHIFT "Ctrl+Shift"
IDS_LEFT_ALT_SHIFT "左Alt+Shift"
IDS_SWITCH_BET_INLANG "入力言語の切り替え"
+ IDS_REBOOT_NOW, "Reboot now?"
END
STRINGTABLE
diff --git a/dll/cpl/input/lang/no-NO.rc b/dll/cpl/input/lang/no-NO.rc
index d2715043b2..e860a6798b 100644
--- a/dll/cpl/input/lang/no-NO.rc
+++ b/dll/cpl/input/lang/no-NO.rc
@@ -106,6 +106,7 @@ BEGIN
IDS_CTRL_SHIFT "Ctrl+Shift"
IDS_LEFT_ALT_SHIFT "Venstre Alt+Shift"
IDS_SWITCH_BET_INLANG "Bytt mellom inndataspråk"
+ IDS_REBOOT_NOW, "Reboot now?"
END
STRINGTABLE
diff --git a/dll/cpl/input/lang/pl-PL.rc b/dll/cpl/input/lang/pl-PL.rc
index e7aee52655..c30300005b 100644
--- a/dll/cpl/input/lang/pl-PL.rc
+++ b/dll/cpl/input/lang/pl-PL.rc
@@ -114,6 +114,7 @@ BEGIN
IDS_CTRL_SHIFT "Ctrl+Shift"
IDS_LEFT_ALT_SHIFT "Lewy Alt+Shift"
IDS_SWITCH_BET_INLANG "Przełącza pomiędzy układami klawiatury"
+ IDS_REBOOT_NOW, "Reboot now?"
END
STRINGTABLE
diff --git a/dll/cpl/input/lang/pt-BR.rc b/dll/cpl/input/lang/pt-BR.rc
index 4ac6977d16..36a281b6aa 100644
--- a/dll/cpl/input/lang/pt-BR.rc
+++ b/dll/cpl/input/lang/pt-BR.rc
@@ -106,6 +106,7 @@ BEGIN
IDS_CTRL_SHIFT "CTRL+SHIFT"
IDS_LEFT_ALT_SHIFT "ALT esquerdo+SHIFT"
IDS_SWITCH_BET_INLANG "Alternar entre idiomas de entrada"
+ IDS_REBOOT_NOW, "Reboot now?"
END
STRINGTABLE
diff --git a/dll/cpl/input/lang/ro-RO.rc b/dll/cpl/input/lang/ro-RO.rc
index b7bf51666e..63dde21faf 100644
--- a/dll/cpl/input/lang/ro-RO.rc
+++ b/dll/cpl/input/lang/ro-RO.rc
@@ -108,6 +108,7 @@ BEGIN
IDS_CTRL_SHIFT "«Ctrl» + «Shift»"
IDS_LEFT_ALT_SHIFT "«Alt» (stâng) + «Shift»"
IDS_SWITCH_BET_INLANG "Comutarea între limbile de intrare"
+ IDS_REBOOT_NOW, "Reboot now?"
END
STRINGTABLE
diff --git a/dll/cpl/input/lang/ru-RU.rc b/dll/cpl/input/lang/ru-RU.rc
index 057e302e07..ffd6e37c80 100644
--- a/dll/cpl/input/lang/ru-RU.rc
+++ b/dll/cpl/input/lang/ru-RU.rc
@@ -106,6 +106,7 @@ BEGIN
IDS_CTRL_SHIFT "Ctrl+Shift"
IDS_LEFT_ALT_SHIFT "Alt слева+Shift"
IDS_SWITCH_BET_INLANG "Переключение между языками ввода"
+ IDS_REBOOT_NOW, "Reboot now?"
END
STRINGTABLE
diff --git a/dll/cpl/input/lang/sk-SK.rc b/dll/cpl/input/lang/sk-SK.rc
index 09069c15e1..4adb1391ec 100644
--- a/dll/cpl/input/lang/sk-SK.rc
+++ b/dll/cpl/input/lang/sk-SK.rc
@@ -111,6 +111,7 @@ BEGIN
IDS_CTRL_SHIFT "Ctrl+Shift"
IDS_LEFT_ALT_SHIFT "Ľavý Alt+Shift"
IDS_SWITCH_BET_INLANG "Switch between input languages"
+ IDS_REBOOT_NOW, "Reboot now?"
END
STRINGTABLE
diff --git a/dll/cpl/input/lang/sq-AL.rc b/dll/cpl/input/lang/sq-AL.rc
index 2c7051fd24..02566a80de 100644
--- a/dll/cpl/input/lang/sq-AL.rc
+++ b/dll/cpl/input/lang/sq-AL.rc
@@ -110,6 +110,7 @@ BEGIN
IDS_CTRL_SHIFT "Ctrl+Shift"
IDS_LEFT_ALT_SHIFT "Left Alt+Shift"
IDS_SWITCH_BET_INLANG "Ndërro ndër gjuhët hyrese"
+ IDS_REBOOT_NOW, "Reboot now?"
END
STRINGTABLE
diff --git a/dll/cpl/input/lang/tr-TR.rc b/dll/cpl/input/lang/tr-TR.rc
index 1234b8c049..0caed2bc93 100644
--- a/dll/cpl/input/lang/tr-TR.rc
+++ b/dll/cpl/input/lang/tr-TR.rc
@@ -108,6 +108,7 @@ BEGIN
IDS_CTRL_SHIFT "Denetim + Üst Damga"
IDS_LEFT_ALT_SHIFT "Sol Seçenek + Üst Damga"
IDS_SWITCH_BET_INLANG "Giriş dilleri arasında geçiş yap."
+ IDS_REBOOT_NOW, "Reboot now?"
END
STRINGTABLE
diff --git a/dll/cpl/input/lang/uk-UA.rc b/dll/cpl/input/lang/uk-UA.rc
index af336ddfbb..bea4493668 100644
--- a/dll/cpl/input/lang/uk-UA.rc
+++ b/dll/cpl/input/lang/uk-UA.rc
@@ -114,6 +114,7 @@ BEGIN
IDS_CTRL_SHIFT "Ctrl+Shift"
IDS_LEFT_ALT_SHIFT "Alt зліва+Shift"
IDS_SWITCH_BET_INLANG "Перемикання мов вводу"
+ IDS_REBOOT_NOW, "Reboot now?"
END
STRINGTABLE
diff --git a/dll/cpl/input/lang/zh-CN.rc b/dll/cpl/input/lang/zh-CN.rc
index cb25920bc1..378132452e 100644
--- a/dll/cpl/input/lang/zh-CN.rc
+++ b/dll/cpl/input/lang/zh-CN.rc
@@ -108,6 +108,7 @@ BEGIN
IDS_CTRL_SHIFT "Ctrl+Shift"
IDS_LEFT_ALT_SHIFT "左 Alt+Shift"
IDS_SWITCH_BET_INLANG "在输入语言间切换"
+ IDS_REBOOT_NOW, "Reboot now?"
END
STRINGTABLE
diff --git a/dll/cpl/input/lang/zh-TW.rc b/dll/cpl/input/lang/zh-TW.rc
index 01ec0c4286..39cc993129 100644
--- a/dll/cpl/input/lang/zh-TW.rc
+++ b/dll/cpl/input/lang/zh-TW.rc
@@ -108,6 +108,7 @@ BEGIN
IDS_CTRL_SHIFT "Ctrl+Shift"
IDS_LEFT_ALT_SHIFT "左 Alt+Shift"
IDS_SWITCH_BET_INLANG "在輸入語言間切換"
+ IDS_REBOOT_NOW, "Reboot now?"
END
STRINGTABLE
diff --git a/dll/cpl/input/resource.h b/dll/cpl/input/resource.h
index b5ae953fde..fee7e9cda9 100644
--- a/dll/cpl/input/resource.h
+++ b/dll/cpl/input/resource.h
@@ -57,6 +57,7 @@
#define IDS_LEFT_ALT_SHIFT 15
#define IDS_SWITCH_BET_INLANG 16
#define IDC_TURNOFFTEXTSVCS_CB 17
+#define IDS_REBOOT_NOW 18
/* Layouts */
#define IDS_US_LAYOUT 5000
diff --git a/dll/cpl/input/settings_page.c b/dll/cpl/input/settings_page.c
index 0404b63c45..72260a8bee 100644
--- a/dll/cpl/input/settings_page.c
+++ b/dll/cpl/input/settings_page.c
@@ -2,7 +2,8 @@
* PROJECT: input.dll
* FILE: dll/cpl/input/settings_page.c
* PURPOSE: input.dll
- * PROGRAMMER: Dmitry Chapyshev (dmitry(a)reactos.org)
+ * PROGRAMMERS: Dmitry Chapyshev (dmitry(a)reactos.org)
+ * Katayama Hirofumi MZ (katayama.hirofumi.mz(a)gmail.com)
*/
#include "input.h"
@@ -357,6 +358,32 @@ OnCommandSettingsPage(HWND hwndDlg, WPARAM wParam)
}
}
+BOOL EnableProcessPrivileges(LPCWSTR lpPrivilegeName, BOOL bEnable)
+{
+ HANDLE hToken;
+ LUID luid;
+ TOKEN_PRIVILEGES tokenPrivileges;
+ BOOL Ret;
+
+ Ret = OpenProcessToken(GetCurrentProcess(),
+ TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY,
+ &hToken);
+ if (!Ret)
+ return Ret; // failure
+
+ Ret = LookupPrivilegeValueW(NULL, lpPrivilegeName, &luid);
+ if (Ret)
+ {
+ tokenPrivileges.PrivilegeCount = 1;
+ tokenPrivileges.Privileges[0].Luid = luid;
+ tokenPrivileges.Privileges[0].Attributes = bEnable ? SE_PRIVILEGE_ENABLED : 0;
+
+ Ret = AdjustTokenPrivileges(hToken, FALSE, &tokenPrivileges, 0, 0, 0);
+ }
+
+ CloseHandle(hToken);
+ return Ret;
+}
static VOID
OnNotifySettingsPage(HWND hwndDlg, LPARAM lParam)
@@ -405,7 +432,20 @@ OnNotifySettingsPage(HWND hwndDlg, LPARAM lParam)
case PSN_APPLY:
{
/* Write Input Methods list to registry */
- InputList_Process();
+ if (InputList_Process())
+ {
+ /* Needs reboot */
+ WCHAR szNeedsReboot[128], szLanguage[64];
+ LoadStringW(hApplet, IDS_REBOOT_NOW, szNeedsReboot,
_countof(szNeedsReboot));
+ LoadStringW(hApplet, IDS_LANGUAGE, szLanguage, _countof(szLanguage));
+
+ if (MessageBoxW(hwndDlg, szNeedsReboot, szLanguage,
+ MB_ICONINFORMATION | MB_YESNOCANCEL) == IDYES)
+ {
+ EnableProcessPrivileges(SE_SHUTDOWN_NAME, TRUE);
+ ExitWindowsEx(EWX_REBOOT | EWX_FORCE, 0);
+ }
+ }
}
break;
}