clipka wrote:
> Indeed. I'm not familiar with testing for Windows version though, so I'd
> file that under "non-trivial change" - I guess there might be quite some
> pitfalls to that, given the diversity of past, present and (probably)
> future Windows versions
It's actually rather straight-forward as the internal version
numbering is different from the marketing names. The GetVersionEx
API call will fill data into a OSVERSIONINFO struct you pass to
it. If dwMajorVersion >= 5 you're on Windows 2000 or higher.
If the improved scaling method is not yet available in 2000
then the test should be
dwMajorVersion >= 6 || (dwMajorVersion == 5 && dwMinorVersion >= 1)
for XP or higher. See
http://msdn.microsoft.com/en-us/library/ms724451(v=VS.85).aspx
for more information.
Post a reply to this message
|