public static string GetServicePack() { var servicePack = string.Empty; if (NativeMethods.GetVersionEx(ref osVersionInfo)) { servicePack = new Structures.OSVERSIONINFOEX { dwOSVersionInfoSize = Marshal.SizeOf(typeof(Structures.OSVERSIONINFOEX)) }.szCSDVersion; } return(servicePack); }
public static extern bool GetVersionEx(ref Structures.OSVERSIONINFOEX osVersionInfo);