Author: dchapyshev Date: Tue Jan 8 00:08:02 2008 New Revision: 31654
URL: http://svn.reactos.org/svn/reactos?rev=31654&view=rev Log: - Apply patch from GedMurphy
Modified: trunk/reactos/dll/win32/syssetup/wizard.c
Modified: trunk/reactos/dll/win32/syssetup/wizard.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/syssetup/wizard.c... ============================================================================== --- trunk/reactos/dll/win32/syssetup/wizard.c (original) +++ trunk/reactos/dll/win32/syssetup/wizard.c Tue Jan 8 00:08:02 2008 @@ -817,27 +817,19 @@ HKEY hKey; LCID lcid; TCHAR Locale[12]; - DWORD dwDisp; - LONG ret = ERROR_SUCCESS;
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) - { - ret = RegCreateKeyEx(HKEY_LOCAL_MACHINE, L"Control Panel\International", - 0, NULL, REG_OPTION_NON_VOLATILE, - KEY_WRITE, NULL, &hKey, &dwDisp); - } - - if (ret == ERROR_SUCCESS) - { - RegSetValueEx(hKey, L"Locale", 0, REG_SZ, (LPBYTE)Locale, (DWORD)(lstrlen(Locale)+1)); + if (RegCreateKeyEx(HKEY_CURRENT_USER, _T("Control Panel\International"), + 0, NULL, REG_OPTION_NON_VOLATILE, + KEY_WRITE, NULL, &hKey, NULL) == ERROR_SUCCESS) + { + RegSetValueEx(hKey, _T("Locale"), 0, REG_SZ, (LPBYTE)Locale, (_tcslen(Locale)+1) * sizeof(TCHAR)); + RegCloseKey(hKey); } } - - RegCloseKey(hKey); }
static INT_PTR CALLBACK