title: C++ How to detect Windows 10
body: <p>I have written a PC auditing tool many years ago and have been keeping it up to date.  One of basic functions is reporting the version of Windows running on the PC being audited for which I have always used the GetVersionEx call.</p>
  
  <p>This works up to and including Windows 8 but is not supported under Windows 10 and indeed Windows 10 returns 8.2 just as windows 8 does.  Microsoft do not seem to have introduced anything as a direct replacement suggesting instead that you check for specific features required rather than looking at the OS but for the purpose of the audit I actually want the OS name.</p>
  
  <p>The 'scanner' is a C++ program which must run under non-privileged accounts so I don't think another suggestion I have read - picking up the version of a system DLL such as kernel32.dll will work as these folders are typically not accessible to users.</p>
  
  <p>Any other suggestions/thoughts are most welcome!</p>