Autor Beitrag
AlexII
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 180



BeitragVerfasst: So 15.02.09 12:21 
Hallo,

ich hab folgende Funktion und bringe sie nicht zum laufen...

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
function IsXP: Boolean;
var
  OS: TOSVERSIONINFO;
begin
  OS.dwOSVersionInfoSize := SizeOf(TOSVERSIONINFO);
  GetVersionEx(OS);
  Result := (OS.dwPlatformId = VER_PLATFORM_WIN32_NT) and
    (OS.dwMajorVersion = 5and (OS.dwMinorVersion = 1);
end;


Wie frage ich jetzt ab ob es sich um XP handelt oder nicht?
PS. Verzeihung bin noch nicht stark in Delphi.


Moderiert von user profile iconNarses: Topic aus VCL (Visual Component Library) verschoben am So 15.02.2009 um 11:22


Zuletzt bearbeitet von AlexII am So 15.02.09 12:53, insgesamt 1-mal bearbeitet
ImbaPanda
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 98

Windows XP/Vista
Delphi 7 Professional/ Rad Studio 2009
BeitragVerfasst: So 15.02.09 12:42 
ausblenden Delphi-Quelltext
1:
2:
If IsXP
  Then ShowMessage('Es ist das Betriebssystem Windows XP installiert');


Deine Funktion liefert dir als Rückgabewert eine Variable vom Typ Boolean, d.h. sie kann entweder den Wert "True"(wahr) oder "False"(falsch) annehmen. Ein True bedeutet in diesem Fall, dass XP vorhanden ist.

MfG
AlexII Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 180



BeitragVerfasst: So 15.02.09 12:55 
Danke dir!