1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59:
| function UsedWindowsVersion : String; var OsVinfo : TOSVERSIONINFO; begin ZeroMemory(@OsVinfo,sizeOf(OsVinfo)); OsVinfo.dwOSVersionInfoSize := sizeof(TOSVERSIONINFO);
if GetVersionEx(OsVinfo) then case OsVinfo.dwPlatformId of VER_PLATFORM_WIN32_WINDOWS: begin case OsVinfo.dwMinorVersion of 00..09 : begin case OsVinfo.dwBuildNumber of 1111 : Result := '95 OEM Service Release 2'; 1214 : Result := '95 OEM Service Release 2.5'; else Result := '95'; end; end; 10..49: begin if (UpperCase(OsVinfo.szCSDVersion[0]) = 'A') or (UpperCase(OsVinfo.szCSDVersion[1]) = 'A') then Result := '98 Zweite Ausgabe' else Result := '98'; end; 50..99: begin Result := 'Millennium Edition'; end; else Result := 'Unbekanntes Betriebssystem'; if SetOSIntegerToo then frm_Main.WinSystem := 0; end; Result := Result + ' (Version '+IntToStr(OsVinfo.dwMajorVersion)+'.'+IntToStr(OsVinfo.dwMinorVersion)+' Build '+IntToStr(OsVinfo.dwBuildNumber)+OsVinfo.szCSDVersion+')'; end; VER_PLATFORM_WIN32_NT: begin case OsVinfo.dwMajorVersion of 4: begin Result := 'NT'; end; 5: case OsVinfo.dwMinorVersion of 0 : begin Result := '2000'; end; 1 : begin Result := 'XP'; end; else Result := 'Unbekanntes Betriebssystem'; end; else Result := 'Unbekanntes Betriebssystem'; end; if Trim(OsVinfo.szCSDVersion) = '' then Result := Result + ' (Version '+IntToStr(OsVinfo.dwMajorVersion)+'.'+IntToStr(OsVinfo.dwMinorVersion)+' Build '+IntToStr(OsVinfo.dwBuildNumber)+')' else Result := Result + ' (Version '+IntToStr(OsVinfo.dwMajorVersion)+'.'+IntToStr(OsVinfo.dwMinorVersion)+' Build '+IntToStr(OsVinfo.dwBuildNumber)+', '+OsVinfo.szCSDVersion+')'; end; else Result := 'Unbekanntes Betriebssystem'; end; Result := 'Microsoft Windows '+Result; end; |