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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

This is OLD CODE -- PRE 2K Wind

Status
Not open for further replies.

WilMead

IS-IT--Management
Jul 6, 2000
281
US
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

 
Not supposed to be in new thread...
response to thread222-159439.

Wil Mead
wmead@optonline.net

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top