Форум: "WinAPI";
Текущий архив: 2002.08.08;
Скачать: [xml.tar.bz2];
ВнизГлупый вопрос! Но... Найти похожие ветки
← →
AlexanderSK (2002-05-24 15:36) [0]Как определить версию Windows, а точнее группу Win95,98,ME или WinNT,2000,XP?
Заранее спасибо!
← →
arbiter (2002-05-24 18:22) [1]GetVersion and $80000000 > 0 => Win9x
← →
Zyv (2002-05-24 18:22) [2]If Win32Platform = VER_PLATFORM_WIN32_WINDOWS Then
...Win95,98,ME
If Win32Platform = VER_PLATFORM_WIN32_NT Then
...WinNT,2000,XP
← →
Viewer (2002-05-24 22:58) [3]Выдернул из своей DLL
function Win: PChar; stdcall; export;
var fOS:TOsVersionInfo;
fWin: string;
fSP: string;
begin
fWin := "unrecognize";
fOS.dwOsVersionInfoSize:=SizeOf(fOS);
GetVersionEx(fOS);
fSP := string(fOS.szCSDVersion);
case fOS.dwPlatformId of
VER_PLATFORM_WIN32S : fWin:="Windows"; // =0
VER_PLATFORM_WIN32_WINDOWS : // =1
case fOS.dwMinorVersion of
0: fWin:="Windows 95";
9: fWin:="Windows Millenium";
10: fWin:="Windows 98";
end;
VER_PLATFORM_WIN32_NT :
case fOS.dwMajorVersion of // =2
3: fWin:="Windows NT 3.51";
4: fWin:="Windows NT 4.0";
5: begin
if fOS.dwMinorVersion=0 then fWin:="Windows 2000";
if fOS.dwMinorVersion=1 then fWin:="Windows XP";
end;
end;
else
fWin:="unknown Windows platform ";
end;
result := PChar(fWin);
end;
← →
Wizard_Ex (2002-05-26 12:23) [4]или
procedure TAboutForm.ShowSystemPlatform;
var data:OSVERSIONINFO;
Winda:string;
begin
data.dwOSVersionInfoSize:=sizeof(OSVERSIONINFO);
GetVersionEx(data);
Winda:="Windows ??";
case data.dwPlatformId of
VER_PLATFORM_WIN32s:Winda:="Windows 3.11";
VER_PLATFORM_WIN32_WINDOWS:
begin
if data.dwMajorVersion>=4 then
begin
if data.dwMinorVersion<10 then Winda:="Windows 95 "+
inttostr(data.dwMajorVersion)+"."+
inttostr(data.dwMinorVersion)+" (Build "+IntToStr(data.dwBuildNumber)+") "+
data.szCSDVersion;
if data.dwMinorVersion>=10 then
if data.szCSDVersion[1]="A" then
Winda:="Windows 98 "+
inttostr(data.dwMajorVersion)+"."+
inttostr(data.dwMinorVersion)+
" SE"+" (Build "+IntToStr(data.dwBuildNumber)+")"
else
Winda:="Windows 98 "+
inttostr(data.dwMajorVersion)+"."+
inttostr(data.dwMinorVersion)+" (Build "+IntToStr(data.dwBuildNumber)+") "+
data.szCSDVersion;
if data.dwMinorVersion>=90 then Winda:="Windows ME "+
inttostr(data.dwMajorVersion)+"."+
inttostr(data.dwMinorVersion)+" (Build "+IntToStr(data.dwBuildNumber)+") "+
data.szCSDVersion;
end;
end;
VER_PLATFORM_WIN32_NT:
begin
if data.dwMajorVersion<=4 then Winda:="Windows NT "+
inttostr(data.dwMajorVersion)+"."+
inttostr(data.dwMinorVersion)+" (Build "+IntToStr(data.dwBuildNumber)+") "+
data.szCSDVersion;;
if data.dwMajorVersion=5 then
begin
if data.dwMinorVersion=0 then Winda:="Windows 2000 "+
inttostr(data.dwMajorVersion)+"."+
inttostr(data.dwMinorVersion)+" (Build "+IntToStr(data.dwBuildNumber)+") "+
data.szCSDVersion;;
if data.dwMinorVersion>=1 then Winda:="Windows XP "+
inttostr(data.dwMajorVersion)+"."+
inttostr(data.dwMinorVersion)+" (Build "+IntToStr(data.dwBuildNumber)+") "+
data.szCSDVersion;;
end;
end;
end;
OS.Caption:=Winda;
end;
где OS это TLabel на форме
← →
Вадим02 (2002-06-01 05:29) [5]Все очень просто!
begin
if (GetVersion() and $80000000)<>0 then
Label3.caption:="Windows 95/98"
else
Label3.caption:="Windows NT/2000/XP";
Страницы: 1 вся ветка
Форум: "WinAPI";
Текущий архив: 2002.08.08;
Скачать: [xml.tar.bz2];
Память: 0.45 MB
Время: 0.006 c