Kernel32GetVersionEx Method
Returns version information about the current operating system.
With the release of Windows 8.1,
the behavior of the
GetVersionEx(OsVersionInfoEx) API has changed in the value it will return for the OS version.
The value returned by the
GetVersionEx(OsVersionInfoEx) function now depends on how the application is manifested.
Applications not manifested for Windows 8.1 or Windows 10 will return the Windows 8 OS version value (6.2).
Once an application is manifested for a given operating system version,
GetVersionEx(OsVersionInfoEx) will always return the version that the application is manifested for in future releases.
Namespace: DevCase.Win32.NativeMethodsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("Kernel32.dll", SetLastError = true)]
public static bool GetVersionEx(
ref OsVersionInfoEx refOsVersionInfo
)
<DllImportAttribute("Kernel32.dll", SetLastError := true>]
Public Shared Function GetVersionEx (
ByRef refOsVersionInfo As OsVersionInfoEx
) As Boolean
Dim refOsVersionInfo As OsVersionInfoEx
Dim returnValue As Boolean
returnValue = Kernel32.GetVersionEx(refOsVersionInfo)
public:
[DllImportAttribute(L"Kernel32.dll", SetLastError = true)]
static bool GetVersionEx(
OsVersionInfoEx% refOsVersionInfo
)
[<DllImportAttribute("Kernel32.dll", SetLastError = true)>]
static member GetVersionEx :
refOsVersionInfo : OsVersionInfoEx byref -> bool
No code example is currently available or this language may not be supported.
- refOsVersionInfo OsVersionInfoEx
-
An OsVersionInfoEx structure that receives the operating system information.
Before calling the GetVersionEx(OsVersionInfoEx) function,
set the SizeOfStruct member as appropriate to indicate which
data structure is being passed to this function.
Boolean
If the function succeeds, the return value is
.
If the function fails, the return value is
.
To get extended error information, call
GetLastWin32Error.