Type OSVERSIONINFO

Purpose
The OSVERSIONINFO data structure contains operating system version information. The information includes major and minor version numbers, a build number, a platform identifier, and descriptive text about the operating system.
 
From library
Kernel32.DLL
 
Type specification Include in your program. Copy/Paste if needed.
Type OSVERSIONINFO
   dwOSVersionInfoSize As Integer 'The size of the structure. In this case (5 * 4 + 128)=148
   dwMajorVersion As Integer      'The major version number; i.e., the part of the version number before the first period
   dwMinorVersion As Integer      'The minor version number; i.e., the part of the version number after the first period
   dwBuildNumber As Integer       'The build number of the version
   dwPlatformId As Integer        'Exactly one of the following flags identifying which platform of Windows is running (see below)
   szCSDVersion As String * 128   'More information about the operating system
End Type
 

'dwPlatformId

' = 0 Windows 3.x is running, using the Win32s pseudo-32-bit enhancements.

' = 1 Windows 95 or 98 is running.

' = 2 Windows NT is running