haacked / Rothko

An abstracted library for interacting with the file system, registry, etc.
MIT License
81 stars 18 forks source link

Report Windows 10 properly #37

Closed haacked closed 8 years ago

haacked commented 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.

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.

haacked commented 8 years ago

Build is borked through no fault of my own. :frowning: