GetVersionEx (help me test this code)
Posted: Wed Jun 22, 2005 7:33 pm
I've just written a procedure to determine the version of windows someone is running. It works on my machine but I need to test it on different versions of Windows.
Could you please test this on your computer, then post the result and your actual OS.
Thanks a lot!
(BTW: Proceedure is free for anyone to use, can't gaurentee it'll work 100% atm).
Code: Select all
Procedure.s WindowsVersion()
Version.OSVERSIONINFO
Version\dwOSVersionInfoSize=SizeOf(OSVERSIONINFO)
GetVersionEx_(Version)
Select Version\dwMajorVersion
Case 4 ;Windows NT 4.0, Windows Me, Windows 98, or Windows 95
Select Version\dwMinorVersion
Case 10
ProcedureReturn "Windows 98"
Case 90
ProcedureReturn "Windows ME"
Default
If Version\dwPlatformID=#VER_PLATFORM_WIN32_WINDOWS
ProcedureReturn "Windows 95"
EndIf
EndSelect
Case 5 ;Windows Server 2003, Windows XP, or Windows 2000
Select Version\dwMinorVersion
Case 1
ProcedureReturn "Windows XP"
Case 2
ProcedureReturn "Windows Server 2003"
Default
ProcedureReturn "Windows 2000"
EndSelect
EndSelect
EndProcedure
MessageRequester("Version",WindowsVersion())
Thanks a lot!
(BTW: Proceedure is free for anyone to use, can't gaurentee it'll work 100% atm).