On the documentation page for the OSVERSIONINFOEX structure, two corresponding fields indicate this:
See the notes for more information.
There is a convenient table in the notes section of the notes table:
Operating system Version number dwMajorVersion dwMinorVersion Other
Windows 8 6.2 6 2 OSVERSIONINFOEX.wProductType == VER_NT_WORKSTATION
Windows Server 2012 6.2 6 2 OSVERSIONINFOEX.wProductType! = VER_NT_WORKSTATION
Windows 7 6.1 6 1 OSVERSIONINFOEX.wProductType == VER_NT_WORKSTATION
Windows Server 2008 R2 6.1 6 1 OSVERSIONINFOEX.wProductType! = VER_NT_WORKSTATION
Windows Server 2008 6 6 0 OSVERSIONINFOEX.wProductType! = VER_NT_WORKSTATION
Windows Vista 6 6 0 OSVERSIONINFOEX.wProductType == VER_NT_WORKSTATION
Windows Server 2003 R2 5.2 5 2 GetSystemMetrics (SM_SERVERR2)! = 0
Windows Home Server 5.2 5 2 OSVERSIONINFOEX.wSuiteMask & VER_SUITE_WH_SERVER
Windows Server 2003 5.2 5 2 GetSystemMetrics (SM_SERVERR2) == 0
Windows XP Prof x64 Ed 5.2 5 2 (OSVERSIONINFOEX.wProductType == VER_NT_WORKSTATION) && (SYSTEM_INFO.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64)
Windows XP 5.1 5 1 Not applicable
Windows 2000 5 5 0 Not applicable
As can be seen from the table, XP is 5.1.
chris source share