From 42dcfdc5989c505e1d88e70eacf58dab4264ad4a Mon Sep 17 00:00:00 2001 From: Stephanie Anderl <46726333+sanderl@users.noreply.github.com> Date: Fri, 10 Jan 2020 15:48:07 -0800 Subject: [PATCH] Update group policy check to look in HKCU instead of HKLM for allowing graphing mode (#918) * Update group policy check to look in HKCU instead of HKLM * Update the dwFlags to use RRF_RT_DWORD. --- src/CalcViewModel/Common/NavCategory.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/CalcViewModel/Common/NavCategory.cpp b/src/CalcViewModel/Common/NavCategory.cpp index 1123dfab..278ca79e 100644 --- a/src/CalcViewModel/Common/NavCategory.cpp +++ b/src/CalcViewModel/Common/NavCategory.cpp @@ -89,10 +89,10 @@ bool IsGraphingModeEnabled() DWORD bufferSize{ sizeof(allowGraphingCalculator) }; // Make sure to call RegGetValueW only on Windows 10 1903+ if (RegGetValueW( - HKEY_LOCAL_MACHINE, + HKEY_CURRENT_USER, L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Calculator", L"AllowGraphingCalculator", - RRF_RT_REG_DWORD | RRF_RT_REG_BINARY, + RRF_RT_DWORD, // RRF_RT_DWORD == RRF_RT_REG_DWORD | RRF_RT_REG_BINARY nullptr, reinterpret_cast(&allowGraphingCalculator), &bufferSize)