如果判断操作系统是98,me,2000还是xp,有完整代码更好!
解决方案 »
- 皮肤控件的问题
- 关于串口通讯
- 为什么把SQL SERVER的数据库记录都已经删除了,数据库文件的大小还没有变?
- 急,我想知道别的程序的运行,如何办啊,
- 麻烦各位检查一下,为什么我一个劲鼠标还会出现鼠标键盘不动的提示!(急!)
- 大家都是把TQUERY等放到DATAMODULE里的吗,但是。。。
- 问题:请问下在xp系统下的开始-程序 双击后会打开程序的文件夹 请问怎么样禁止这个功能???
- ListView的元素前面的那个打钩设置的代码怎么写?
- 收到CSDN的杂志乐,送分庆祝一下!〔限前30名〕!
- 我搞不定了:exception EDBEngineError in moudule projiect.exe at XXXXXX, BDE error $000f
- 请问怎样把WORD的类型转换成STRING类型
- 没注意什么时候长成五个角了??!CSDN还有菜鸟吗?菜鸟有分!UP有分!
function GetWindowsVersion: string;
var
// windows api structure
VersionInfo: TOSVersionInfo;
begin
// get size of the structure
VersionInfo.dwOSVersionInfoSize := SizeOf(VersionInfo);
// populate the struct using api call
GetVersionEx(VersionInfo);
// platformid gets the core platform
// major and minor versions also included.
with VersionInfo do
begin
case dwPlatformid of
0 : begin
result := 'Windows 3.11';
end; // end 0 1 : begin
case dwMinorVersion of
0 : result := 'Windows 95';
10: begin
if ( szCSDVersion[ 1 ] = 'A' ) then
Result :='Windows 98 SE'
else
Result := 'Windows 98';
end; // end 10
90 : result := 'Windows Millenium';
else
result := 'Unknown Version';
end; // end case
end; // end 1 2 : begin
case dwMajorVersion of
3 : result := 'Windows NT ' +
IntToStr(dwMajorVersion) + '.' +
IntToStr(dwMinorVersion);
4 : result := 'Windows NT ' +
IntToStr(dwMajorVersion) + '.' +
IntToStr(dwMinorVersion);
5 : begin
case dwMinorVersion of
0 : result := 'Windows 2000';
1 : result := 'Windows Whistler';
end; // end case
end; // end 5
else
result := 'Unknown Version';
end; // end case
// service packs apply to the NT/2000 platform
if szCSDVersion <> '' then
result := result + ' Service pack: ' + szCSDVersion;
end; // end 2
else
result := 'Unknown Platform';
end; // end case
// add build info.
result := result + ', Build: ' +
IntToStr(Loword(dwBuildNumber)) ;
end; // end version info
end; // GetWindowsVersion
还有result := result + ', Build: ' +
IntToStr(Loword(dwBuildNumber)) ;是什么意思?可以不要吗?