Click here to Skip to main content
12,635,237 members (25,257 online)
Click here to Skip to main content
Add your own
alternative version

Stats

113.3K views
40 bookmarked
Posted

Windows Version Numbers

, 11 Jul 2001 CPOL
Rate this:
Please Sign up or sign in to vote.
Values returned by GetVersionEx for Windows operating systems

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.

dwPlatformIDdwMajorVersiondwMinorVersiondwBuildNumber
95140950
95 SP1140> 950 && <= 1080
95 OSR214< 10> 1080
9814101998
98 SP11410>1998 && < 2183
98 SE1410>= 2183
Me14903000
NT 3.5123511057
NT 42401381
20002502195
XP251 
CE 1.0310 
CE 2.0320 
CE 2.1321 
CE 3.0330 

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)

Share

About the Author

Hans Dietrich
Software Developer (Senior) Hans Dietrich Software
United States United States
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.

For consulting and custom software development, please see www.hdsoft.org.






You may also be interested in...

Comments and Discussions

 
QuestionHow to get vista version? (Home Basic, Ultimate...) Pin
Mason Hou13-Apr-07 18:50
memberMason Hou13-Apr-07 18:50 
AnswerRe: How to get vista version? (Home Basic, Ultimate...) Pin
FaxedHead1-Oct-07 20:28
memberFaxedHead1-Oct-07 20:28 
On Windows Vista and Windows Server 2008 a new function is available in kernel32.dll, called GetProductInfo(). It retrieves the product type for the operating system on the local computer, and maps the type to the product types supported by the specified operating system. You have to supply the major and minor version of the OS and the major and minor version of the service pack; then it returns a value that can indicate an unknown product, and unlicensed product or a specific edition such as business, ultimate, enterprise, enterprise server, and so on. For more about the function and possible value, see http://msdn2.microsoft.com/en-us/library/ms724358.aspx.

(from http://www.codeguru.com/cpp/w-p/system/systeminformation/article.php/c8973/)
Questionhow to detect the os name Pin
Manoj Singh K22-Mar-05 21:48
memberManoj Singh K22-Mar-05 21:48 
AnswerA-a..... Pin
sergeyv200224-Mar-05 7:20
membersergeyv200224-Mar-05 7:20 
GeneralWin2003 Pin
Armen Hakobyan5-May-04 8:25
memberArmen Hakobyan5-May-04 8:25 
AnswerRe: Win2003 Pin
Hans Dietrich19-Apr-11 11:51
mentorHans Dietrich19-Apr-11 11:51 
GeneralAnother version on Code Project... Pin
Mark Findlay12-Jul-01 9:29
memberMark Findlay12-Jul-01 9:29 
GeneralRe: Another version on Code Project... Pin
Michael Mac24-Aug-02 2:18
memberMichael Mac24-Aug-02 2:18 
GeneralRe: Another version on Code Project... Pin
Anonymous8-Oct-03 4:06
sussAnonymous8-Oct-03 4:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.161208.2 | Last Updated 12 Jul 2001
Article Copyright 2001 by Hans Dietrich
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid