static WindowsSystemInformation () { var osVersion = new PRTL_OSVERSIONINFOW (); osVersion.dwOSVersionInfoSize = new UIntPtr ((uint)Marshal.SizeOf (osVersion)); RtlGetVersion (ref osVersion); version = new Version ((int)(uint)osVersion.dwMajorVersion, (int)(uint)osVersion.dwMinorVersion, (int)(uint)osVersion.dwBuildNumber); }
static extern int RtlGetVersion(ref PRTL_OSVERSIONINFOW version);