Private Type OSVERSIONINFO dwOSVersionInfoSize As Long dwMajorVersion As Long dwMinorVersion As Long dwBuildNumber As Long dwPlatformId As Long szCSDVersion As String * 128End TypePrivate Declare Function GetVersionEx Lib "kernel32" Alias "GetVersionExA" _ (lpVersionInformation As OSVERSIONINFO) As Long' Windows Build number.Function WindowsBuildNumber() As Long Dim os As OSVERSIONINFO, ver As String ' The function expects the UDT size in its first element. os.dwOSVersionInfoSize = Len(os) GetVersionEx os WindowsBuildNumber = os.dwBuildNumberEnd Function

