Noticed in various places that it shows that the OS() function returns 6.02 for Windows 8.1 and Server 2012R2, unless you specifically target for Win8.1 by specifying settings in the manifest file.
Further searching led to information indicating that the GetVersion() and GetVersionEx() apis have been superceded
http://msdn.microsoft.com/en-us/library/windows/desktop/dn424972(v=vs.85).aspxAh well... wait... those "functions" are defined in versionhelpers.h -- which Microsoft describes as API functions, but on further examination elsewhere, it appears that they could be used as such, but are in reality macros that are expanded to that calls various other API functions... ... and this versionhelpers.h only exists if you have the windows 8.1 SDK installed... .. and sometimes it doesn't work as this file includes the presence of some other files (of which I can't seem to get clear story on what).... ugh.
So... it appears that in various places people have gone and worked some of it out (at least for currently released versions of Windows ... as of 2014...)
http://www.codeproject.com/Articles/678606/Part-Overcoming-Windows-s-deprecation-of-GetVehttp://jpetermugaas.com/versionhelpers.htmlGee... and all wanted to get was the version of the OS... How complicated does this have to get?
This is looking to be even more convoluted than what one had to do back in DOS days when there was the DOSVER command that could be used to get the OS to essentially lie about itself to applications... And to work around that you had to do some probing in a few areas, just to make sure that DOS wasn't "lying" to you... gak!
Apparently it seems that the motivation for this is because there have been some programs that incorrectly checked OS version, and Microsoft was trying to get ways to make the OS compatible with these applications....