Package com.sun.jna.platform.win32
Klasse VersionHelpers
java.lang.Object
com.sun.jna.platform.win32.VersionHelpers
The following functions can be used to determine the current operating system
version or identify whether it is a Windows or Windows Server release. These
functions provide simple tests that use the VerifyVersionInfo function and
the recommended greater than or equal to comparisons that are proven as a
robust means to determine the operating system version.
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic boolean
static boolean
static boolean
static boolean
static boolean
static boolean
Applications that need to distinguish between server and client versions of Windows should call this function.static boolean
IsWindowsVersionOrGreater
(int wMajorVersion, int wMinorVersion, int wServicePackMajor) This function is useful in confirming a version of Windows Server that doesn't share a version number with a client release.static boolean
static boolean
static boolean
static boolean
static boolean
static boolean
static boolean
-
Konstruktordetails
-
VersionHelpers
public VersionHelpers()
-
-
Methodendetails
-
IsWindowsVersionOrGreater
public static boolean IsWindowsVersionOrGreater(int wMajorVersion, int wMinorVersion, int wServicePackMajor) This function is useful in confirming a version of Windows Server that doesn't share a version number with a client release. You should only use this function if the other provided version helper functions do not fit your scenario.- Parameter:
wMajorVersion
- The major version to testwMinorVersion
- The minor version to testwServicePackMajor
- The service pack to test- Gibt zurück:
- True if the current OS version matches, or is greater than, the provided version information.
-
IsWindowsXPOrGreater
public static boolean IsWindowsXPOrGreater()- Gibt zurück:
- true if the current OS version matches, or is greater than, the Windows XP version.
-
IsWindowsXPSP1OrGreater
public static boolean IsWindowsXPSP1OrGreater()- Gibt zurück:
- true if the current OS version matches, or is greater than, the Windows XP with Service Pack 1 (SP1) version.
-
IsWindowsXPSP2OrGreater
public static boolean IsWindowsXPSP2OrGreater()- Gibt zurück:
- true if the current OS version matches, or is greater than, the Windows XP with Service Pack 2 (SP2) version.
-
IsWindowsXPSP3OrGreater
public static boolean IsWindowsXPSP3OrGreater()- Gibt zurück:
- true if the current OS version matches, or is greater than, the Windows XP with Service Pack 3 (SP3) version.
-
IsWindowsVistaOrGreater
public static boolean IsWindowsVistaOrGreater()- Gibt zurück:
- true if the current OS version matches, or is greater than, the Windows Vista version.
-
IsWindowsVistaSP1OrGreater
public static boolean IsWindowsVistaSP1OrGreater()- Gibt zurück:
- true if the current OS version matches, or is greater than, the Windows Vista with Service Pack 1 (SP1) version.
-
IsWindowsVistaSP2OrGreater
public static boolean IsWindowsVistaSP2OrGreater()- Gibt zurück:
- true if the current OS version matches, or is greater than, the Windows Vista with Service Pack 2 (SP2) version.
-
IsWindows7OrGreater
public static boolean IsWindows7OrGreater()- Gibt zurück:
- true if the current OS version matches, or is greater than, the Windows 7 version.
-
IsWindows7SP1OrGreater
public static boolean IsWindows7SP1OrGreater()- Gibt zurück:
- true if the current OS version matches, or is greater than, the Windows 7 with Service Pack 1 (SP1) version.
-
IsWindows8OrGreater
public static boolean IsWindows8OrGreater()- Gibt zurück:
- true if the current OS version matches, or is greater than, the Windows 8 version.
-
IsWindows8Point1OrGreater
public static boolean IsWindows8Point1OrGreater()- Gibt zurück:
- true if the current OS version matches, or is greater than, the
Windows 8.1 version. For Windows 8.1 and/or Windows 10,
IsWindows8Point1OrGreater()
returns false unless the application contains a manifest that includes a compatibility section that contains the GUIDs that designate Windows 8.1 and/or Windows 10.
-
IsWindows10OrGreater
public static boolean IsWindows10OrGreater()- Gibt zurück:
- true if the current OS version matches, or is greater than, the
Windows 10 version. For Windows 10,
IsWindows8Point1OrGreater()
returns false unless the application contains a manifest that includes a compatibility section that contains the GUID that designates Windows 10.
-
IsWindowsServer
public static boolean IsWindowsServer()Applications that need to distinguish between server and client versions of Windows should call this function.- Gibt zurück:
- true if the current OS is a Windows Server release.
-