sikas
sikas

Reputation: 5523

C++ Detect OS Version

I want to know how to detect the running OS using the C++ and which service pack installed

Upvotes: 4

Views: 7667

Answers (4)

Daniel Daranas
Daniel Daranas

Reputation: 22624

For Windows, see this example called GetOSDisplayString from MSDN, in which the use of GetVersionEx is demonstrated.

Upvotes: 5

Ryan Reeves
Ryan Reeves

Reputation: 10229

I assume you're writing unmanaged C++ using Win32? Look into the Win32 API GetVersionEx.

Upvotes: 8

Brian Walker
Brian Walker

Reputation: 8908

Assuming this is for Windows - use GetVersionEx

Upvotes: 4

user492536
user492536

Reputation: 907

Maybe this can be helpful: http://msdn.microsoft.com/en-us/library/ak37a69s%28v=VS.90%29.aspx

Upvotes: 1

Related Questions