This is OLD CODE -- PRE 2K
Windows 2000 shows as NT 5.x
Not sure what ME does, same for XP. THe help on GetVersion has always given enough insight though. There are better ways to pull Major and Minor. Code signatures... What can I say.
[tt]
declare function GetVersion lib "kernel32" () as long
public function OSVersion() as string
dim Ver as long
dim Major as integer, Minor as integer
Versn = GetVersion()
Major = Versn and &HFF
Minor = (Versn - (Versn and &HFFFF0000)) / 256
if (0 = (Versn AND &h80000000)) then ' Win NT
OSVersion= "Win NT " & Major & "." & Minor
else ' Win 9x
OSVersion = IIf(Major>0, "Win98", "Win95"
end if
end function
[/tt]
Wil Mead
wmead@optonline.net
Windows 2000 shows as NT 5.x
Not sure what ME does, same for XP. THe help on GetVersion has always given enough insight though. There are better ways to pull Major and Minor. Code signatures... What can I say.
[tt]
declare function GetVersion lib "kernel32" () as long
public function OSVersion() as string
dim Ver as long
dim Major as integer, Minor as integer
Versn = GetVersion()
Major = Versn and &HFF
Minor = (Versn - (Versn and &HFFFF0000)) / 256
if (0 = (Versn AND &h80000000)) then ' Win NT
OSVersion= "Win NT " & Major & "." & Minor
else ' Win 9x
OSVersion = IIf(Major>0, "Win98", "Win95"
end if
end function
[/tt]
Wil Mead
wmead@optonline.net