From 7316e9742e6da5f3d7ededd762d576c695083863 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Tue, 30 Dec 2014 12:21:04 +0000 Subject: [PATCH] [CALC] 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 --- reactos/base/applications/calc/winmain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reactos/base/applications/calc/winmain.c b/reactos/base/applications/calc/winmain.c index ca72f2ace2c..4100ee16a40 100644 --- a/reactos/base/applications/calc/winmain.c +++ b/reactos/base/applications/calc/winmain.c @@ -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; }