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; }
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); } }
public static extern short GetVersionEx(ref OSVERSIONINFO o);