示例#1
0
 string GetServicePack()
 {
     OSVERSIONINFO os = new OSVERSIONINFO();
     os.dwOSVersionInfoSize = Marshal.SizeOf(typeof(OSVERSIONINFO));
     GetVersionEx(ref os);
     if (os.szCSDVersion == "")
         return "        No Service Pack installed";
     else
         return "        " + os.szCSDVersion;
 }
示例#2
0
        string GetServicePack()
        {
            OSVERSIONINFO os = new OSVERSIONINFO();

            os.dwOSVersionInfoSize = Marshal.SizeOf(typeof(OSVERSIONINFO));
            GetVersionEx(ref os);
            if (os.szCSDVersion == "")
            {
                return("        No Service Pack installed");
            }
            else
            {
                return("        " + os.szCSDVersion);
            }
        }
示例#3
0
 public static extern short GetVersionEx(ref OSVERSIONINFO o);
示例#4
0
 public static extern short GetVersionEx(ref OSVERSIONINFO o);