Solved

How to get correct installed directX version?

Posted on 2013-10-22
3
821 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 29

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As game developers, we quickly learn that Artificial Intelligence (AI) doesn’t need to be so tough.  To reference Space Ghost: “Moltar, I have a giant brain that is able to reduce any complex machine into a simple yes or no answer. (http://www.youtu…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

705 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