I need some help finding an API call that will return the OS that is running on the machine. I've found just about every piece of info about the OS, but not which OS (NT, 95, 98, etc)...I'm about to go insane!!!
Printable View
I need some help finding an API call that will return the OS that is running on the machine. I've found just about every piece of info about the OS, but not which OS (NT, 95, 98, etc)...I'm about to go insane!!!
this project will tell you if it is windows 9x or NT
works on NT,95,98,2000,XP
hope this helps you
Jason
Code:'put this in a module
Declare Function GetVersionEx Lib "kernel32.dll" Alias "GetVersionExA" (lpVersionInformation As OSVERSIONINFO) As Long
Type OSVERSIONINFO
dwOSVersionInfoSize As Long
dwMajorVersion As Long
dwMinorVersion As Long
dwBuildNumber As Long
dwPlatformId As Long
szCSDVersion As String * 128
End Type
Code:'displays the major and minor version numbers of windows
'for example, 4.0 represents windows 95
Dim os As OSVERSIONINFO, retval As Long
os.dwOSVersionInfoSize = Len(os)
retval = GetVersionEx(os)
Debug.Print "Windows version number:"; os.dwMajorVersion; "."; os.dwMinorVersion