![]() |
General Reading »
Hardware & System »
General
Intermediate
License: The Code Project Open License (CPOL)
Windows Version NumbersBy Hans DietrichValues returned by GetVersionEx for Windows operating systems |
C++Win2K, WinXP, Visual Studio, Dev
|
|
Advanced Search Add to IE Search |
|
|
|
||||||||||||||||
Sometimes you need to know a very simple thing, like "Is it Windows NT?". Some of the solutions to this problem are excellent and very thorough, but seem to be overkill. But when you try to find out what it takes to determine what OS your program is running on, then you find there is no one place to go to.
The facts about what data are returned by GetVersionEx are scattered
around Microsoft site. Here are a few articles I have tracked down:
As you will see from reading them, these articles are not complete.
I have pulled together following table from many different sources, including Usenet news groups, searching web sites, and reading code here and on other developer sites. It is only a beginning, and if you have knowledge to share please email me and I will acknowledge your contribution.
dwPlatformID |
dwMajorVersion |
dwMinorVersion |
dwBuildNumber |
|
| 95 | 1 | 4 | 0 | 950 |
| 95 SP1 | 1 | 4 | 0 | > 950 && <= 1080 |
| 95 OSR2 | 1 | 4 | < 10 | > 1080 |
| 98 | 1 | 4 | 10 | 1998 |
| 98 SP1 | 1 | 4 | 10 | >1998 && < 2183 |
| 98 SE | 1 | 4 | 10 | >= 2183 |
| Me | 1 | 4 | 90 | 3000 |
| NT 3.51 | 2 | 3 | 51 | 1057 |
| NT 4 | 2 | 4 | 0 | 1381 |
| 2000 | 2 | 5 | 0 | 2195 |
| XP | 2 | 5 | 1 | |
| CE 1.0 | 3 | 1 | 0 | |
| CE 2.0 | 3 | 2 | 0 | |
| CE 2.1 | 3 | 2 | 1 | |
| CE 3.0 | 3 | 3 | 0 | |
I have developed a simple function which uses this table to return
a single value that can be used in applications. The function is
called GetWinVer and it is in FontFile demo
here.
Depending on what readers want to see, there are several areas for new entries:
| You must Sign In to use this message board. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
General
News
Question
Answer
Joke
Rant
Admin
|
PermaLink |
Privacy |
Terms of Use
Last Updated: 11 Jul 2001 Editor: Andrew Peace |
Copyright 2001 by Hans Dietrich Everything else Copyright © CodeProject, 1999-2009 Web21 | Advertise on the Code Project |