Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

OSVersion Info about Win XP and Win 2000

Status
Not open for further replies.

Hmadyson

Programmer
Mar 14, 2001
202
US
I am using GetVersionInfoEx to figure out which operating system is being used. Unfortunately I only have VB6, so it has constants up to Win NT. I am trying to search the microsoft and msdn websites for the new information to get at Windows 2000 and Windows XP, but they keep crashing on me (the websites not the code). Here is what I am using so far, can you please supplement me with the new constants. Thanks.

Public Type OSVERSIONINFO
dwOSVersionInfoSize As Long
dwMajorVersion As Long
dwMinorVersion As Long
dwBuildNumber As Long
dwPlatformId As Long
szCSDVersion As String * 128 ' Maintenance string for PSS usage
End Type
Public Declare Function GetVersion Lib "kernel32" () As Long
Public Declare Function GetVersionEx Lib "kernel32" Alias "GetVersionExA" (lpVersionInformation As OSVERSIONINFO) As Long
Public Const VER_PLATFORM_WIN32_NT = 2
Public Const VER_PLATFORM_WIN32_WINDOWS = 1
Public Const VER_PLATFORM_WIN32s = 0
 
ALternatively, you could have done a search in this site, and found the recent thread222-620471 and thread222-576839 which between them will allow you to additionally discriminate between W98 and W98SE, between XP Pro and XP Home, and also spot W2003
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top