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
Post a Comment