On 8/26/2010 5:02 AM, yathish kumar wrote:
> Hi All,
> I have one challenge that, how you will find out the windows version (about 
> windows version) using C program. The output must contain the windows inf 
> (like Service pack, version...so on)how can you achieve this..?
> Am waiting for your genuine replies,
> Thanks,Kumar

A quick Google search for "get windows version" turned up:

http://msdn.microsoft.com/en-us/library/ms724429%28VS.85%29.aspx

I don't know why you need this code, so let me emphasize one line:

"Relying on version information is not the best way to test for a feature."

A MUCH better way to test for a feature is to test for its existence on 
the system.  A LoadLibrary()/GetProcAddress() call is all that is 
usually needed.  Using version detection will almost always break the 
application when newer versions of Windows are released.

The ONLY purpose of getting version information of the OS should be for 
collecting it as part of a technical support package.

-- 
Thomas Hruska
CubicleSoft President

Barebones CMS is a high-performance, open source content management 
system for web developers operating in a team environment.

An open source CubicleSoft initiative.
Your choice of a MIT or LGPL license.

http://barebonescms.com/

Reply via email to