Sign in Join
Wiki copytemporary

WindowsVersion/de: what changed

Revision 0 to 1. Removed lines have a minus sign; added lines have a plus sign.

Title: WindowsVersion/de

OldNewLine
1+Zurück zur Seite [[code examples/de|Code Beispiele]].\
2+
3+Dieser Artikel beschäftigt sich mit der Windowsprogrammierung.\
4+Die Funktion ermittelt die Nummer der aktuellen Windowsversion.\
5+
6+``` pascal
7+uses
8+ Windows, SysUtils, ...;
9+
10+ ...
11+
12+{
13+Beispiele für Windows-Versionsnummern:
14+5.0 => Windows 2000
15+5.1 => Windows XP
16+5.2 => Windows XP64 oder Windows 2003 Server
17+6.0 => Windows Vista oder Windows 2008 Server
18+6.1 => Windows 7 oder Windows 2008 Server R2
19+6.2 => Windows 8 oder Windows Server 2012
20+6.3 => Windows 8.1 oder Windows Server 2012 RS
21+}
22+
23+function funGetWinVer: string;
24+// Liefert die Versionsnummer von Windows als String
25+begin
26+ Result := IntToStr(LOBYTE(LOWORD(GetVersion)));
27+ Result := Result + '.';
28+ Result := Result + IntToStr(HIBYTE(LOWORD(GetVersion)));
29+end;
30+```
31+
32+Alternativ stellt die Unit [[SysUtils]] die Versionsinformationen in Variablen bereit:
33+
34+``` pascal
35+program EchoWinVersion;
36+uses sysutils;
37+begin
38+ Writeln('Win32Platform : ', Win32Platform );
39+ Writeln('Win32MajorVersion: ', Win32MajorVersion);
40+ Writeln('Win32MinorVersion: ', Win32MinorVersion);
41+ Writeln('Win32BuildNumber : ', Win32BuildNumber );
42+ Writeln('Win32CSDVersion : ', Win32CSDVersion );
43+ readln;
44+end.
45+```
46+
47+Die Ausgabe sieht für Windows 7 Service Pack 1 so aus:
48+
49+ Win32Platform : 2
50+ Win32MajorVersion: 6
51+ Win32MinorVersion: 1
52+ Win32BuildNumber : 7601
53+ Win32CSDVersion : Service Pack 1
54+
55+---
56+*From the Free Pascal wiki, page "WindowsVersion/de", as it stood on 2020-12-10 after a change by FTurtle, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*

Back to history