c - How to get Windows version by name (for future Windows versions)? -


i can use getversionex() function windows version, function return number , not string. there no problem can convert number string, example:

if (osvi.dwmajorversion == 6 && osvi.dwminorversion == 1) {     printf("%s\n", "windows 7"); } 

but if new windows version came out after releasing program. have recompile program add new windows version!

you should query caption of win32_operatingsystem.


Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -