The Win32 GetVersionEx function returns information that a program can use to identify the operating system. Among those values are the major and minor revision numbers and a platform identifier. With the introduction of Windows 98, it now takes a more involved logical evaluation to determine which version of Windows is in use. The listing below provides the data needed to evaluate the OSVERSIONINFO structure populated by the GetVersionEx function:
Windows 95 | Windows 98 | Windows Me | Windows NT 4.0 | Windows 2000 | Windows XP | |
---|---|---|---|---|---|---|
PlatformID | 1 | 1 | 1 | 2 | 2 | 2 |
Major Version | 4 | 4 | 4 | 4 | 5 | 5 |
Minor Version | 0 | 10 | 90 | 0 | 0 | 1 |