Service pack
-
Hello friends, The problem is i wanted to know how to get the SERVICE PACK installed on the Operating system PROGRAMATICALLY i am working in VC6 Enviroment. Please Please help me Thanx TAKE CARE
-
Hello friends, The problem is i wanted to know how to get the SERVICE PACK installed on the Operating system PROGRAMATICALLY i am working in VC6 Enviroment. Please Please help me Thanx TAKE CARE
Use GetVersionEx method and pass OSVERSIONINFOEX structure in it. This will return with all the OS environment on the system including service pack info. Hope it helps. Good Luck, Abhishek. Learning is a never ending process of Life.
-
Hello friends, The problem is i wanted to know how to get the SERVICE PACK installed on the Operating system PROGRAMATICALLY i am working in VC6 Enviroment. Please Please help me Thanx TAKE CARE
Something like this:
CString sOS; OSVERSIONINFO OSversion = {0}; OSversion.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); ::GetVersionEx(&OSversion); switch (OSversion.dwPlatformId) { case VER\_PLATFORM\_WIN32s: sOS.Format(\_T("Windows %d.%d"),OSversion.dwMajorVersion,OSversion.dwMinorVersion); break; case VER\_PLATFORM\_WIN32\_WINDOWS: if (OSversion.dwMinorVersion == 0) { sOS=\_T("Windows 95"); } else { if (OSversion.dwMinorVersion == 10) { sOS=\_T("Windows 98"); } else { if (OSversion.dwMinorVersion == 90) { sOS=\_T("Windows ME"); } } } break; case VER\_PLATFORM\_WIN32\_NT: if (OSversion.dwMajorVersion == 5 && OSversion.dwMinorVersion == 0) { sOS.Format(\_T("Windows 2000 with %s"),OSversion.szCSDVersion); } else { if (OSversion.dwMajorVersion == 5 && OSversion.dwMinorVersion == 1) { sOS.Format(\_T("Windows XP %s"),OSversion.szCSDVersion); } else { if (OSversion.dwMajorVersion <= 4) { sOS.Format(\_T("Windows NT %d.%d with %s"),OSversion.dwMajorVersion, OSversion.dwMinorVersion,OSversion.szCSDVersion); } else { // for unknown windows/newest windows version sOS.Format(\_T(Windows NT Unknown %d.%d with %s)),OSversion.dwMajorVersion, OSversion.dwMinorVersion); } } }
I prefer to wear gloves when using it, but that's merely a matter of personal hygiene [Roger Wright on VB] Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. [Rich Cook]