mirror of
https://github.com/reactos/reactos.git
synced 2025-02-25 09:50:02 +00:00
svn path=/trunk/; revision=15241
This commit is contained in:
parent
c24c77ccaf
commit
03800ad522
1 changed files with 5 additions and 5 deletions
|
@ -95,7 +95,7 @@ void SetNewLocale(LCID lcid)
|
||||||
HKEY langKey;
|
HKEY langKey;
|
||||||
DWORD ret;
|
DWORD ret;
|
||||||
TCHAR value[9];
|
TCHAR value[9];
|
||||||
DWORD lenvalue;
|
DWORD valuesize;
|
||||||
|
|
||||||
ret = RegOpenKeyW(HKEY_CURRENT_USER, L"Control Panel\\International", &localeKey);
|
ret = RegOpenKeyW(HKEY_CURRENT_USER, L"Control Panel\\International", &localeKey);
|
||||||
|
|
||||||
|
@ -107,9 +107,9 @@ void SetNewLocale(LCID lcid)
|
||||||
}
|
}
|
||||||
|
|
||||||
wsprintf(value, L"%04X", (DWORD)lcid);
|
wsprintf(value, L"%04X", (DWORD)lcid);
|
||||||
lenvalue = wcslen(value) * sizeof(WCHAR);
|
valuesize = (wcslen(value) + 1) * sizeof(WCHAR);
|
||||||
|
|
||||||
RegSetValueExW(localeKey, L"Locale", 0, REG_SZ, (BYTE *)value, lenvalue);
|
RegSetValueExW(localeKey, L"Locale", 0, REG_SZ, (BYTE *)value, valuesize);
|
||||||
RegCloseKey(localeKey);
|
RegCloseKey(localeKey);
|
||||||
|
|
||||||
// Set language
|
// Set language
|
||||||
|
@ -118,8 +118,8 @@ void SetNewLocale(LCID lcid)
|
||||||
if (ret != ERROR_SUCCESS)
|
if (ret != ERROR_SUCCESS)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
RegSetValueExW(langKey, L"Default", 0, REG_SZ, (BYTE *)value, lenvalue );
|
RegSetValueExW(langKey, L"Default", 0, REG_SZ, (BYTE *)value, valuesize );
|
||||||
RegSetValueExW(langKey, L"InstallLanguage", 0, REG_SZ, (BYTE *)value, lenvalue );
|
RegSetValueExW(langKey, L"InstallLanguage", 0, REG_SZ, (BYTE *)value, valuesize );
|
||||||
RegCloseKey(langKey);
|
RegCloseKey(langKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue