5,545,925 members and growing! (18,634 online)
Email Password   helpLost your password?
General Reading » Hardware & System » General     Intermediate License: The Code Project Open License (CPOL)

Windows Version Numbers

By Hans Dietrich

Values returned by GetVersionEx for Windows operating systems
C++NT4, Win2K, WinXP, Windows, Visual Studio, Dev

Posted: 11 Jul 2001
Updated: 11 Jul 2001
Views: 73,751
Bookmarked: 32 times
Announcements
Want a new Job?



Search    
Advanced Search
Sitemap
28 votes for this Article.
Popularity: 6.53 Rating: 4.51 out of 5
0 votes, 0.0%
1
0 votes, 0.0%
2
1 vote, 9.1%
3
1 vote, 9.1%
4
9 votes, 81.8%
5

Introduction

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.

What Microsoft Says

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.

Table of Windows Version Numbers

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  

How to use this information

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.

Future Enhancements

Depending on what readers want to see, there are several areas for new entries:

  • Windows versions prior to Win95
  • CE versions
  • Service pack information for NT

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

Hans Dietrich


Mvp
I attended St. Michael's College of the University of Toronto, with the intention of becoming a priest. A friend in the University's Computer Science Department got me interested in programming, and I have been hooked ever since.

Recently, I have moved to Los Angeles where I am doing consulting and development work.
Occupation: Software Developer (Senior)
Location: United States United States

Other popular Hardware & System articles:

Article Top
Sign Up to vote for this article
You must Sign In to use this message board.
FAQ FAQ Noise ToleranceSearch Search Messages 
 Layout  Per page   
 Msgs 1 to 8 of 8 (Total in Forum: 8) (Refresh)FirstPrevNext
Subject  Author Date 
GeneralHow to get vista version? (Home Basic, Ultimate...)memberMason Hou18:50 13 Apr '07  
AnswerRe: How to get vista version? (Home Basic, Ultimate...)memberFaxedHead20:28 1 Oct '07  
Generalhow to detect the os namememberManoj Singh K21:48 22 Mar '05  
GeneralA-a.....membersergeyv20027:20 24 Mar '05  
GeneralWin2003memberArmen Hakobyan8:25 5 May '04  
GeneralAnother version on Code Project...memberMark Findlay9:29 12 Jul '01  
GeneralRe: Another version on Code Project...memberMichael Mac2:18 24 Aug '02  
GeneralRe: Another version on Code Project...sussAnonymous4:06 8 Oct '03  

General General    News News    Question Question    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

PermaLink | Privacy | Terms of Use
Last Updated: 11 Jul 2001
Editor: Andrew Peace
Copyright 2001 by Hans Dietrich
Everything else Copyright © CodeProject, 1999-2008
Web17 | Advertise on the Code Project