Use RegCreateKeyEx to be able to create the settings registry key in case it doesn't already exist.
Patch by Ricardo Hanke.
CORE-8986 #resolve #comment Fixed, thanks!

svn path=/trunk/; revision=65906
This commit is contained in:
Hermès Bélusca-Maïto 2014-12-30 12:21:04 +00:00
parent 2272ff8795
commit 7316e9742e

View file

@ -286,7 +286,7 @@ static void save_config(void)
HKEY hKey;
DWORD sepValue;
if (RegOpenKeyEx(HKEY_CURRENT_USER, TEXT("SOFTWARE\\Microsoft\\Calc"), 0, KEY_ALL_ACCESS, &hKey) != ERROR_SUCCESS )
if (RegCreateKeyEx(HKEY_CURRENT_USER, TEXT("SOFTWARE\\Microsoft\\Calc"), 0, NULL, REG_OPTION_NON_VOLATILE, KEY_SET_VALUE, NULL, &hKey, NULL) != ERROR_SUCCESS)
{
return;
}