Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C++ (http://www.go4expert.com/forums/cpp/)
-   -   Getting OS name in VC++ (http://www.go4expert.com/forums/getting-os-vcpp-t17759/)

rag84dec 31May2009 11:52

Getting OS name in VC++
 
HI all,

There is one problem with VC++.The minor number and major number for "Vista" and "Windows 2008 server" are same.So, in order to distinguish between the two wProductType should be used.But winbase.h packaged with vc++ 6.0, wProductType field is not available.

My question is ... Is there any other way of getting the Proper OS name ?.

Thanks in advance...

shabbir 31May2009 21:42

Re: Getting OS name in VC++
 
Check out OS version detection for 32 and 64 bit OS.

rag84dec 1Jun2009 07:46

Re: Getting OS name in VC++
 
This is what i have done. But your code does not mention how i will differentiate between Vista and Wind 2008 server through some other method . since productid is not supported in the OSVERSIONINFOEX.

shabbir 1Jun2009 09:56

Re: Getting OS name in VC++
 
Quote:

Originally Posted by rag84dec (Post 48691)
This is what i have done. But your code does not mention how i will differentiate between Vista and Wind 2008 server through some other method . since productid is not supported in the OSVERSIONINFOEX.

Probably because when I wrote I did not had that OS and so table probably needs upgrade.


All times are GMT +5.5. The time now is 10:55.