IsWindows7SP1OrGreater - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// versionhelpers.h

VERSIONHELPERAPI IsWindows7SP1OrGreater();
View the official Win32 API reference

NtDoc

No description available.

Win32 API reference (nf-versionhelpers-iswindows7sp1orgreater)

IsWindows7SP1OrGreater function

Description

Indicates if the current OS version matches, or is greater than, the Windows 7 with Service Pack 1 (SP1) version.

Return value

True if the current OS version matches, or is greater than, the Windows 7 with SP1 version; otherwise, false.

Remarks

This function does not differentiate between client and server releases. It will return true if the current OS version number is equal to or higher than the version of the client named in the call. For example, a call to IsWindowsXPSP3OrGreater will return true on Windows Server 2008. Applications that need to distinguish between server and client versions of Windows should call IsWindowsServer.

For situations where a Windows Server version number isn't shared with a Windows client release, you can use IsWindowsVersionOrGreater to confirm.

Examples

The inline functions defined in the VersionHelpers.h header file let you verify the operating system version by returning a Boolean value when testing for a version of Windows.

For example, if your application requires Windows 7 with SP1 or later, use the following test.

#include <VersionHelpers.h>

    if (!IsWindows7SP1OrGreater())
    {
       MessageBox(NULL, "You need at least Windows 7 with SP1", "Version Not Supported", MB_OK);
    }

See also

IsWindows7OrGreater

IsWindows8OrGreater

IsWindows8Point1OrGreater

IsWindowsServer

IsWindowsVistaOrGreater

IsWindowsVistaSP1OrGreater

IsWindowsVistaSP2OrGreater

IsWindowsXPOrGreater

IsWindowsXPSP1OrGreater

IsWindowsXPSP2OrGreater

IsWindowsXPSP3OrGreater