Solved

How to get correct installed directX version?

Posted on 2013-10-22
3
750 Views
Last Modified: 2013-11-06
Dear experts,

I need to find installed directX version by source code.
I read this question already http://www.experts-exchange.com/Programming/Game/Q_26747833.html

I use [HKEY_LOCAL_MACHINE\Software\Microsoft\DirectX] registry.
But it seems not correct for DirectX 11:
-  My system uses Windows 8
-  I use dxdiag, it show [DirectX Version: DirectX 11]
-  But [Version] key in [HKEY_LOCAL_MACHINE\Software\Microsoft\DirectX] is "4.09.00.0904"

So, please help me the way for getting the correct installed directX in system.

Regards,
0
Comment
Question by:FSOFT-SA
  • 2
3 Comments
 
LVL 28

Assisted Solution

by:chilternPC
chilternPC earned 250 total points
ID: 39590555
Check out this note:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms724451%28v=vs.85%29.aspx

it says - may be altered or unavailable for releases after Windows 8.1.

You can use the D3D11 API. When you initialize D3D11, you can specify and/or query for the feature levels supported. You could  just attempt to initialize D3D10 and see if it fails.
0
 
LVL 62

Accepted Solution

by:
☠ MASQ ☠ earned 250 total points
ID: 39590665
From DX 10 Microsoft stopped using the registry to store the version number - you can still quiz that location if you think the system has 9.0c or older but you'll need to decode the output string.

From DX10 onward the version is held in dxgi.dll (dxv.xml) and this is where DXDiag pulls the info from.

Programmatically (insert disclaimer here - I am not a programmer!) it seems it's difficult to extract it directly into anything usable.

The API for the D3D helper suggested above is a good compromise and includes source code for C++
0
 
LVL 62

Expert Comment

by:☠ MASQ ☠
ID: 39627065
Thanks for closing this - sorry you felt the quality of the answer deserved the lowest grade available to you.

Without feedback from you though it is difficult to help you further.
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now