Closed haacked closed 8 years ago
Environment.OSVersion on Windows 10 machines still report Windows 8. This is because the APIs that OSVersion uses (GetVersion and GetVersionEx) are deprecated.
Environment.OSVersion
OSVersion
GetVersion
GetVersionEx
Windows 8.1 and higher supplies new Version Helper functions (see https://msdn.microsoft.com/library/windows/desktop/dn424972.aspx). Unfortunately, these are a pain to call. Fortunately I found a CodeProject article that helped me get most of the way.
We attempt to use these APIs first, and if they fail, we fallback to our old logic.
I should probably add an interface for VersionHelper and expose it publicly, but that can come later.
VersionHelper
Build is borked through no fault of my own. :frowning:
Environment.OSVersion
on Windows 10 machines still report Windows 8. This is because the APIs thatOSVersion
uses (GetVersion
andGetVersionEx
) are deprecated.Windows 8.1 and higher supplies new Version Helper functions (see https://msdn.microsoft.com/library/windows/desktop/dn424972.aspx). Unfortunately, these are a pain to call. Fortunately I found a CodeProject article that helped me get most of the way.
We attempt to use these APIs first, and if they fail, we fallback to our old logic.
I should probably add an interface for
VersionHelper
and expose it publicly, but that can come later.