OSVERSIONINFOEX (Structures)
Last changed: J Landheer-190.95.31.149

.
Summary
The OSVERSIONINFOEX structure contains operating system version information. The information includes major and minor version numbers, a build number, a platform identifier, and information about product suites and the latest Service Pack installed on the system.

C# Definition:

[StructLayout(LayoutKind.Sequential, CharSet=CharSet.Ansi)]  
struct OSVERSIONINFOEX {
   public int dwOSVersionInfoSize;  
   public int dwMajorVersion;  
   public int dwMinorVersion;  
   public int dwBuildNumber;  
   public int dwPlatformId;
   [MarshalAs(UnmanagedType.ByValTStr, SizeConst=128)]
   public string szCSDVersion;
   public UInt16 wServicePackMajor;  
   public UInt16 wServicePackMinor;  
   public UInt16 wSuiteMask;
   public byte wProductType;  
   public byte wReserved;

}

VB Definition:

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Ansi)> _

Structure OSVERSIONINFOEX

   Public dwOSVersionInfoSize As Integer
   Public dwMajorVersion As Integer
   Public dwMinorVersion As Integer
   Public dwBuildNumber As Integer
   Public dwPlatformId As Integer
   <MarshalAs(UnmanagedType.ByValTStr, SizeConst:=128)> _
   Public szCSDVersion As String
   Public wServicePackMajor As UInt16
   Public wServicePackMinor As UInt16
   Public wSuiteMask As UInt16
   Public wProductType As Byte
   Public wReserved As Byte

End Structure 'OSVERSIONINFOEX

User-Defined Field Types:

None.

Notes:

Use the overloaded API call GetVersionEx().

Documentation