Autor Beitrag
Juliman
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 81



BeitragVerfasst: Mo 04.10.04 18:57 
Moin!
Mein Topic sagt eigendlich schon alles:

Ich will das installierte System erkennen und dann jeweils etwas anderes machen.

Ich glaube, das geht irgendwie mit const oder so?!

Ich hoffe ihr könnt mir helfen!

Julian


Zuletzt bearbeitet von Juliman am Di 05.10.04 14:29, insgesamt 1-mal bearbeitet
raziel
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 2453

Arch Linux
JS (WebStorm), C#, C++/CLI, C++ (VS2013)
BeitragVerfasst: Mo 04.10.04 19:06 
Die Schweizer mal wieder:
www.swissdelphicente.../showcode.php?id=316
www.swissdelphicente...=1126&detail=851
In den Kommentaren wurde nach der Deklaration von TOSVersion gefragt. -> Windows-Unit einbinden.

_________________
JSXGraph
toms
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1099
Erhaltene Danke: 2



BeitragVerfasst: Mo 04.10.04 19:12 
raziel
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 2453

Arch Linux
JS (WebStorm), C#, C++/CLI, C++ (VS2013)
BeitragVerfasst: Mo 04.10.04 19:14 
raziel hat folgendes geschrieben:
www.swissdelphicente.../showcode.php?id=316
toms hat folgendes geschrieben:
www.swissdelphicente.../showcode.php?id=316
:?!?:

_________________
JSXGraph
toms
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1099
Erhaltene Danke: 2



BeitragVerfasst: Mo 04.10.04 19:18 
war ein wenig spät beim abschicken... darum...
Juliman Threadstarter
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 81



BeitragVerfasst: Di 05.10.04 14:29 
okay...
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: Di 05.10.04 19:32 
raziel hat folgendes geschrieben:
-> Windows-Unit einbinden.

Wer hat die (außer den Puristen-Freaks) nicht sowieso standard-mäßig eingebunden??? :D

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.
raziel
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 2453

Arch Linux
JS (WebStorm), C#, C++/CLI, C++ (VS2013)
BeitragVerfasst: Di 05.10.04 19:42 
Die, die die (da da da...) drei Kommentare im SDC geschrieben haben, wo denn TOSVersion deklariert sei... ;) Also eine rein prophylaktische Maßnahme.

_________________
JSXGraph
Harry M.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 754

Win 2000, XP
D2005
BeitragVerfasst: Mo 25.10.04 21:36 
ausblenden volle Höhe Delphi-Quelltext
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:
function GetWindowsVersion : string;
var winInfo : TOSVersionInfo;
begin
    result := '';
    winInfo.dwOSVersionInfoSize := sizeof (OSVERSIONINFO);
    GetVersionEx(winInfo);
    if winInfo.dwPlatformId = VER_PLATFORM_WIN32_NT then begin
      if (winInfo.dwMajorVersion <= 4) then begin
        result :=  'Windows NT ' + inttostr(winInfo.dwMajorVersion);
      end;
      if ((winInfo.dwMajorVersion = 5) and (winInfo.dwMinorVersion = 0)) then
        result := 'Windows 2000'
      else
        if ((winInfo.dwMajorVersion = 5 ) and (winInfo.dwMinorVersion > 1)) then  result :=  'Windows XP';
    end;
    if winInfo.dwPlatformId = VER_PLATFORM_WIN32_WINDOWS then begin
      if ((winInfo.dwMajorVersion > 4) or ((winInfo.dwMajorVersion = 4) and (winInfo.dwMinorVersion > 0))) then begin
        if (winInfo.dwMinorVersion = 90) then
          result := 'Windows ME'
        else
          result := 'Windows 98';
      end else
        result := 'Windows 95';
      end;
    if result = '' then result := 'Win32s';
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
 label1.Caption := GetWindowsVersion;
end;


ich denke damit sollte dir geholfen sein
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Mo 25.10.04 22:22 
Dann muss er aber immer einen String vergleichen, was nicht so schön ist, dann doch lieber das: www.luckie-online.de.../WindowsVersion.html
Harry M.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 754

Win 2000, XP
D2005
BeitragVerfasst: Di 26.10.04 12:20 
super beispiel code !!!!!!!!!!!! habe ich mir gleich kopiert...

kommt ganz drauf an wie umfassed man es braucht.

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
function IsNT : boolean;
var VersionInfo : TOSVersionInfo;
begin
  VersionInfo.dwOSVersionInfoSize:=SizeOf(VersionInfo);
  GetVersionEx(VersionInfo);
  Result := (VersionInfo.dwPlatformId = VER_PLATFORM_WIN32_NT);
end;



procedure TForm1.Button1Click(Sender: TObject);
begin
  if IsNT then
    statictext1.caption := 'Ahh, Windows NT !!!'
  else
    statictext1.caption := 'Oh Gott! Nur Windows 95 ...';
end;