日期:2009-07-30 浏览次数:20504 次
environment env
integer resp
string temp,ls_version
resp = getenvironment(env)
Long L1
dec{2} ldc_WinVer
string ls_WinVer
L1 = GetVersion()
ldc_WinVer = MOD(intlow(L1),256) + int(intlow(L1)/256)/100
choose case ldc_WinVer
case 3.10
ls_WinVer = "Windows 3.x"
case 4
ls_WinVer = "Windows NT 4.0"
case 4.10
ls_WinVer = "Windows 98"
case 5
ls_WinVer = "Windows 2000"
case 5.01
ls_WinVer = "Windows XP"
case 5.02
ls_WinVer = "Windows 2003"
end choose
messagebox("Windows version",ls_WinVer)
// Function: gf_getos()
// Description: Get current Os name
// Arguments: value integer
// Returns: string
// 95-98 : Windows
// 2000- : WindowsNT
// Else : ""
// Author:Kilojin Date: 2005.02.14
// Modify History:
//
environment env
integer rtn
rtn = GetEnvironment(env)
IF rtn <> 1 THEN RETURN ""
CHOOSE CASE env.OSType
CASE Windows!
// Windows 95 or 98 code
return "Windows"
CASE WindowsNT!
// Windows NT-specific code
return "WindowsNT"
CASE Sol2!
IF env.OSMinorRevision = 5 THEN
RETURN ""
ELSEIF env.OSMinorRevision = 6 THEN
// Solaris 2.6 code
RETURN ""
END IF
CASE ELSE
RETURN ""
END CHOOSE