Click here to Skip to main content
15,885,365 members
Articles / Desktop Programming / MFC
Article

GetVersionEx API for Windows Millenium Edition

Rate me:
Please Sign up or sign in to vote.
2.28/5 (20 votes)
14 Jul 2003 66.6K   11   12
Ever wondered why that GetVersion function reported your operating system was Windows 98, when infact it is indeed Windows ME?

Introduction

If you've ever tested the GetVersionEx API on many an operating system it usually works a treat, which is what you'd expect from a tried and tested API that works as far back as Windows 3.1! Until that is, you try it on Windows Millenium Edition which returns the correct value provided that the name of the calling application is not

  • setup.exe, or
  • launch.exe

It's hard to beleive that such anamolies are present in the API function without any mention on the MSDN forums or VC help. It was apparently added to ensure backward compatability for installation programs (which is where the setup.exe comes in).

Hope this has helped someone before they tear their hair out in stress wondering what went wrong with their coding!

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Software Developer (Senior)
United Kingdom United Kingdom
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
GeneralMy vote of 1 Pin
NetDave4-Mar-09 8:55
NetDave4-Mar-09 8:55 
GeneralThank You Pin
ChrisTheTall9-Jun-04 4:09
ChrisTheTall9-Jun-04 4:09 
GeneralFYI: GetVersionEx and Windows 3.1 Pin
pjnaughter21-Jul-03 12:37
pjnaughter21-Jul-03 12:37 
GeneralInteresting info... Pin
Nish Nishant14-Jul-03 23:03
sitebuilderNish Nishant14-Jul-03 23:03 
GeneralRe: Interesting info... Pin
NGS 54967215-Jul-03 4:50
NGS 54967215-Jul-03 4:50 
GeneralRe: Interesting info... Pin
Nish Nishant15-Jul-03 5:23
sitebuilderNish Nishant15-Jul-03 5:23 
GeneralRe: Interesting info... Pin
Anonymous15-Jul-03 7:22
Anonymous15-Jul-03 7:22 
GeneralRe: Interesting info... Pin
Nish Nishant15-Jul-03 15:12
sitebuilderNish Nishant15-Jul-03 15:12 
Anonymous wrote:
What is reported incorrectly.

I believe he says that in the article title description where he says ME is reported as 98


Anonymous wrote:
How to work around the problem

I guess he never found a way out

Nish


"I'm a bit bored at the moment so I'm thinking about writing a new programming language" - Colin Davies

My book :- Summer Love and Some more Cricket [New Win]
Review by Shog9 Click here for review[NW]

GeneralRe: Interesting info... Pin
Paolo Messina15-Jul-03 9:59
professionalPaolo Messina15-Jul-03 9:59 
GeneralRe: Interesting info... Pin
Nish Nishant15-Jul-03 15:16
sitebuilderNish Nishant15-Jul-03 15:16 
GeneralRe: Interesting info... Pin
Rob Manderson15-Jul-03 13:08
protectorRob Manderson15-Jul-03 13:08 
GeneralRe: Interesting info... Pin
Nish Nishant15-Jul-03 15:14
sitebuilderNish Nishant15-Jul-03 15:14 

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.