Skip to content

vdcommon: Do not use GetVersionEx to get Windows version

Frediano Ziglio requested to merge fziglio/vd_agent_win:mr_version into master

GetVersionEx was deprecated by Microsoft in favour of utilities in versionhelpers.h. The new function returns the same results as:

  • GetVersionEx returns maximum 6.2 version and also 6.0 version is Vista, not Windows 7 so SYS_VER_WIN_7_CLASS was returned for all system from Windows Vista;
  • We don't support version earlier than Windows XP and no Windows versions had version >= 5.2 and < 6.0 so SYS_VER_WIN_XP_CLASS was returned from Windows XP;
  • we don't support any system before Windows XP.

Tested under Windows XP, 7 and 10.

Signed-off-by: Frediano Ziglio

Merge request reports