Solved

How to get correct installed directX version?

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
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 viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

896 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

15 Experts available now in Live!

Get 1:1 Help Now