mirror of
https://github.com/reactos/reactos.git
synced 2025-08-02 21:56:06 +00:00
- Apply patch from GedMurphy
svn path=/trunk/; revision=31654
This commit is contained in:
parent
cd933bb16c
commit
98128b8390
1 changed files with 6 additions and 14 deletions
|
@ -817,27 +817,19 @@ WriteUserLocale(VOID)
|
||||||
HKEY hKey;
|
HKEY hKey;
|
||||||
LCID lcid;
|
LCID lcid;
|
||||||
TCHAR Locale[12];
|
TCHAR Locale[12];
|
||||||
DWORD dwDisp;
|
|
||||||
LONG ret = ERROR_SUCCESS;
|
|
||||||
|
|
||||||
lcid = GetSystemDefaultLCID();
|
lcid = GetSystemDefaultLCID();
|
||||||
|
|
||||||
if (GetLocaleInfo(MAKELCID(lcid, SORT_DEFAULT), LOCALE_ILANGUAGE, (WORD*)Locale, sizeof(Locale)) != 0)
|
if (GetLocaleInfo(MAKELCID(lcid, SORT_DEFAULT), LOCALE_ILANGUAGE, Locale, sizeof(Locale) / sizeof(Locale[0])) != 0)
|
||||||
{
|
{
|
||||||
if (RegOpenKey(HKEY_CURRENT_USER, L"Control Panel\\International", &hKey) != ERROR_SUCCESS)
|
if (RegCreateKeyEx(HKEY_CURRENT_USER, _T("Control Panel\\International"),
|
||||||
|
0, NULL, REG_OPTION_NON_VOLATILE,
|
||||||
|
KEY_WRITE, NULL, &hKey, NULL) == ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
ret = RegCreateKeyEx(HKEY_LOCAL_MACHINE, L"Control Panel\\International",
|
RegSetValueEx(hKey, _T("Locale"), 0, REG_SZ, (LPBYTE)Locale, (_tcslen(Locale)+1) * sizeof(TCHAR));
|
||||||
0, NULL, REG_OPTION_NON_VOLATILE,
|
RegCloseKey(hKey);
|
||||||
KEY_WRITE, NULL, &hKey, &dwDisp);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ret == ERROR_SUCCESS)
|
|
||||||
{
|
|
||||||
RegSetValueEx(hKey, L"Locale", 0, REG_SZ, (LPBYTE)Locale, (DWORD)(lstrlen(Locale)+1));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
RegCloseKey(hKey);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static INT_PTR CALLBACK
|
static INT_PTR CALLBACK
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue