方法1.
environment env
integer resp
string temp,ls_version
resp = getenvironment(env)
choose case env.ostype
case aix!
temp = 'aix'
case hpux!
temp = 'hpux'
case macintosh!
temp = 'macintosh'
case osf1!
temp = 'osf1'
case sol2!
temp = 'solaris 2'
case windows!
temp = 'windows'
case windowsnt!
temp = 'windows nt'
end choose
ls_version = temp + ' '+string(env.osmajorrevision)+'.'+string(env.osminorrevision)+'.'+string(env.osfixesrevision)
messagebox("windows version",ls_version)
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
Java Asp PHP .Net XML C/C++ CGI VB Jsp J2ee J2se J2me EJB Servlet Tomcat Resin Struts Weblogic Eclipse ANT GUI JMS Web servise IDEA Webphere Hibernate Spring Jboss Applet Swing Socket Javamail Perl Ajax P2P 安全 模式 框架 测试 开源 游戏
Windows XP Windows 2000 Windows 2003 Windows Me Windows 9.x Linux UNIX 注册表 操作系统 服务器 应用服务器