Solved

How to get correct installed directX version?

Posted on 2013-10-22
3
794 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

Independent Software Vendors: 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

Suggested Solutions

Title # Comments Views Activity
Embarcadero C++ Builder XE2 TDateTime 8 80
best sources to up-to-date in C++? 8 104
Video Game Storyline Theory and Development 4 109
How do i run a c++ file? 15 52
Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

730 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