Platform SDK: Windows System Information OSVERSIONINFO 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. To obtain additional version information, see the OSVERSIONINFOEX structure. typedef struct _OSVERSIONINFO { DWORD dwOSVersionInfoSize; DWORD dwMajorVersion; DWORD dwMinorVersion; DWORD dwBuildNumber; DWORD dwPlatformId; TCHAR szCSDVersion[128]; } OSVERSIONINFO; Members dwOSVersionInfoSize Size of this data structure, in bytes. Set this member to sizeof(OSVERSIONINFO) before calling the GetVersionEx function. dwMajorVersion Major version number of the operating system. This member can be one of the following values. Operating System Meaning 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 Server 2003 family 5 dwMinorVersion Minor version number of the operating system. This member can be one of the following values. Operating System Meaning 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 Server 2003 family 2 dwBuildNumber Build number of the operating system. Windows Me/98/95: The low-order word contains the build number of the operating. The high-order word contains the major and minor version numbers. dwPlatformId Operating system platform. This member can be one of the following values. Value Meaning 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, Windows 2000, Windows XP, or Windows Server 2003 family. szCSDVersion Pointer to a null-terminated string, such as "Service Pack 3", that indicates the latest Service Pack installed on the system. If no Service Pack has been installed, the string is empty. Windows Me/98/95: Pointer to a null-terminated string that indicates additional version information. For example, " C" indicates Windows 95 OSR2 and " A" indicates Windows 98 Second Edition. Remarks 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. Requirements Client: Included in Windows XP, Windows 2000 Professional, Windows NT Workstation 3.5 and later, Windows Me, Windows 98, and Windows 95. Server: Included in Windows Server 2003, Windows 2000 Server, and Windows NT Server 3.5 and later. Unicode: Declared as Unicode and ANSI structures. Header: Declared in Winnt.h; include Windows.h. See Also System Information Overview, System Information Structures, GetVersionEx, OSVERSIONINFOEX Platform SDK Release: February 2003 What did you think of this topic? Order a Platform SDK CD Requirements Client: Included in Windows XP, Windows 2000 Professional, Windows NT Workstation 3.5 and later, Windows Me, Windows 98, and Windows 95. Server: Included in Windows Server 2003, Windows 2000 Server, and Windows NT Server 3.5 and later. Unicode: Declared as Unicode and ANSI structures. Header: Declared in Winnt.h; include Windows.h. See Also System Information Overview, System Information Structures, GetVersionEx, OSVERSIONINFOEX