Directx Version Checking

Created by Jijith Nadumuri at 28 Apr 2010 12:07 and updated at 28 Apr 2010 12:46

Version Checking

Applications sometimes need to know which version of Microsoft DirectX is currently available on the system. In addition to determining the Microsoft DirectX version, applications may also need to know what operating system they are running on, and perhaps which Service Pack has been installed.

DirectX Version Checking

There is no direct way to obtain the DirectX version number. The preferred way to determine whether your desired version is available is to test for its characteristic objects or interfaces. GetDXVersion returns an integer that corresponds to the DirectX version that is present on the system. This is not a regular function but comes with the DirectX sample code.

Operating System Version Checking

The preferred way to check the operating system version is to use the Microsoft Windows function, GetVersionEx. This function returns an OSVERSIONINFO structure that contains a variety of information including:

  • Whether the system is Microsoft Windows NT-based or Windows 95/98/ME
  • The major and minor version numbers
  • The service pack number, for Windows NT-based systems

Share:- Facebook

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License