Help Center

AfxGetWindowsVersionfunction

Returns the Windows version.

WindowsfunctionAfxWin.incdoc-orphan
No implementation located. This member is documented, but the source scan found no matching declaration. It is likely declared in a header this scan does not resolve, or provided by a macro.

Syntax

FUNCTION AfxWindowsVersion () AS LONG
Also documented as AfxWindowsVersion — one description covers them all.

Return value

Platform 1:

Platform 2:

Note 1: As Windows 95 and Windows NT return the same version number, we also need to call AfxGetWindowsPlatform to differentiate them.

Note 2: As Windows 10 and Windows 11 return the same version number, we also need to call AfxWindowsBuild to differentiate them. Windows 11 is Windows 10 build 21996 and higher.

Description

Returns the Windows version.

Examples

400 Windows 95 410 Windows 98 490 Windows ME

400 Windows NT 500 Windows 2000 501 Windows XP 502 Windows Server 2003 600 Windows Vista and Windows Server 2008 601 Windows 7 602 Windows 8 603 Windows 8.1 1000 Windows 10

Reference

  • Include file AfxWin.inc
  • Documented in Windows/Windows Procedures.md
  • Topic: Windows Procedures