windows: prefer os version from registry

this value is not modified by compatibility mode
drop reporting service pack numbers. no longer used
This commit is contained in:
Shawn Hoffman
2023-01-17 01:23:44 -08:00
parent 10fd768898
commit dff7f20f9d
7 changed files with 102 additions and 45 deletions

View File

@ -0,0 +1,15 @@
#pragma once
#include <Windows.h>
namespace WindowsRegistry
{
template <typename T>
bool ReadValue(T* value, const std::string& subkey, const std::string& name);
template bool ReadValue(u32* value, const std::string& subkey, const std::string& name);
template bool ReadValue(u64* value, const std::string& subkey, const std::string& name);
template <>
bool ReadValue(std::string* value, const std::string& subkey, const std::string& name);
OSVERSIONINFOW GetOSVersion();
}; // namespace WindowsRegistry