GetVersionEx

GetVersionEx retrieves the operating system version. The value returned by the GetVersionEx function depends on how the application is manifested. To manifest your applications for Windows 10, refer to the Microsoft article Targeting your application for Windows.

Syntax

Copy
NOT_BUILD_WINDOWS_DEPRECATE BOOL GetVersionEx(
    [in, out]   LPOSVERSIONINFOA lpVersionInformation
);

Parameters

[in, out] lpVersionInformation

An OSVERSIONINFO or OSVERSIONINFOEX structure that receives the operating system information.

Before calling the GetVersionEx function, set the dwOSVersionInfoSize member of the structure as appropriate to indicate which data structure is being passed to this function.

Return Value

If the function succeeds, it returns a non-zero value. If the function fails, it returns 0 (zero). Call GetLastError to get extended error information.

The function fails if you specify an invalid value for the dwOSVersionInfoSize member of the OSVERSIONINFO or OSVERSIONINFOEX structure.

REMARKS

See the Microsoft documentation for more information: https://docs.microsoft.com/en-us/windows/win32/api/sysinfoapi/nf-sysinfoapi-getversionexa

Requirements

Minimum supported version Header Library

wRTOS 1.0 SDK

windows.h

wRTOS_rtss.lib