Retrieves the current operating system.

OsEx()

Return Value

An integer representing the operating system in use.

ValueOS
1Windows 95
2Windows 95 OSR2
3Windows 98
4Windows 98 Second Edition
5Windows Millennium
6Windows NT 3.5
7Windows NT 4.0
8Windows NT 4.0 Server
9Windows 2000
10Windows XP
11Windows XP Professional x64
12Windows Home Server
13Windows Vista
14Windows Server 2003
15Windows Server 2003 R2
16Windows 7
17Windows Server 2008
18Windows Server 2008 R2
19Unknown Windows with a higher version number

Remarks

If compatibility mode is in effect, the OsEx function reports the operating system as it identifies itself, which may not be the operating system that is installed. For example, if compatibility mode is in effect, OsEx reports the operating system that is selected for application compatibility.

See Also

Reference

ADesktopArea
ADesktops
ADisplayDevices
AResolutions
AWindowStations
ExpandEnvironmentStrings
GetLocaleInfoEx
GetSystemDirectory
GetWindowsDirectory

Used WinApi functions

GetVersionEx
GetNativeSystemInfo
GetSystemInfo