GetDXVer Sample

GetDXVer Sample

Applications sometimes need to know which version of DirectX is currently available on the system. If an older version of DirectX is on the system, your application may need to scale itself to the capabilities of that version or install the most recent version.

The table lists the version of DirectX that shipped with each operating system:

Operating System DirectX Version
Windows 98 Gold DirectX 5.2
Windows 98 SE DirectX 6.1a
Windows 2000 DirectX 7.0
Windows Millenium Edition DirectX 7.1
Windows XP DirectX 8.1

DirectX 9.0 is supported on Windows XP.

The GetDXVer SDK sample has a function in it called GetDXVersion that returns the version of DirectX that is installed. As long as this integer is greater than or equal to your desired version number, your application will run normally.

Path

Source: (SDK root)\Samples\C++\Misc\GetDXVer
Executable: (SDK root)\Samples\C++\Misc\Bin\GetDXVer

Checking the Operating System Version

Use the Windows function GetVersionEx to check the operating system installed. This function returns an OSVERSIONINFOEX structure that contains a variety of information about the operating system.