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.
This commit is contained in:
		
				
					committed by
					
						
						Eric Wong
					
				
			
			
				
	
			
			
			
						parent
						
							6c524e68e2
						
					
				
				
					commit
					42dcfdc598
				
			@@ -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<LPBYTE>(&allowGraphingCalculator),
 | 
			
		||||
            &bufferSize)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user