Platform SDK: Windows System Information |
The OSVERSIONINFO data structure contains operating system version information. The information includes major and minor version numbers, a build number, a platform identifier, and descriptive text about the operating system. This structure is used with the GetVersionEx function.
typedef struct _OSVERSIONINFO{ DWORD dwOSVersionInfoSize; DWORD dwMajorVersion; DWORD dwMinorVersion; DWORD dwBuildNumber; DWORD dwPlatformId; TCHAR szCSDVersion[ 128 ]; } OSVERSIONINFO;
Operating System | Value |
---|---|
Windows 95 | 4 |
Windows 98 | 4 |
Windows Me | 4 |
Windows NT 3.51 | 3 |
Windows NT 4.0 | 4 |
Windows 2000 | 5 |
Windows XP | 5 |
Windows .NET Server | 5 |
Operating System | Value |
---|---|
Windows 95 | 0 |
Windows 98 | 10 |
Windows Me | 90 |
Windows NT 3.51 | 51 |
Windows NT 4.0 | 0 |
Windows 2000 | 0 |
Windows XP | 1 |
Windows .NET Server | 1 |
Windows 95/98/Me: Identifies the build number of the operating system in the low-order word. The high-order word contains the major and minor version numbers.
Value | Platform |
---|---|
VER_PLATFORM_WIN32s | Win32s on Windows 3.1. |
VER_PLATFORM_WIN32_WINDOWS | Windows 95, Windows 98, or Windows Me. |
VER_PLATFORM_WIN32_NT | Windows NT 3.51, Windows NT 4.0, Windows 2000, Windows XP, or Windows .NET Server. |
Windows 95/98/Me: Contains a null-terminated string that indicates additional version information. For example, " C" indicates Windows 95 OSR2 and " A" indicates Windows 98 Second Edition.
Relying on version information is not the best way to test for a feature. Instead, refer to the documentation for the feature of interest. For more information on common techniques for feature detection, see Operating System Version.
If you must require a particular operating system, be sure to use it as a minimum supported version, rather than design the test for the one operating system. This way, your detection code will continue to work on future versions of Windows.
Windows NT/2000/XP: Included in Windows NT 3.5 and later.
Windows 95/98/Me: Included in Windows 95 and later.
Header: Declared in Winnt.h; include Windows.h.
Unicode: Declared as Unicode and ANSI structures.
System Information Overview, System Information Structures, GetVersionEx, OSVERSIONINFOEX
![]() |
What did you think of this topic? Let us know. |
![]() |
Order a Platform SDK CD Online (U.S/Canada) (International) |
Contact Us | E-Mail this Page | MSDN Flash Newsletter |
© 2002 Microsoft Corporation. All rights reserved. Terms of Use Privacy Statement Accessibility |