c# DirectX version

G

Guest

Guest
hello,
i making a system information program and one of the things that the user will see is the directx version thats installed.
but my porblem is: i dont know how to get that in c#.
thank you
 
G

Guest

Guest
if i look in the register my dx version is 4.09.00.0904 but dxdiag says dx 11 so the registery is wrong
 

ezskills

Honorable
Jul 13, 2013
7
0
10,520
1
Open DirectX Diagnostic Tool by clicking the Start button or windows key and pressing R at the same time typing dxdiag in the search box, and then pressing Enter.Click the System tab, and then, under System Information, check the DirectX version number.
 

ezskills

Honorable
Jul 13, 2013
7
0
10,520
1
Type regedit in the serch box first press windows key and R at the same time then click on the folders as listed you can check "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DirectX" registry for DirectX version
 
G

Guest

Guest
if i look in the register my dx version is 4.09.00.0904 but dxdiag says dx 11 so the registery is wrong
 

randomizer

Distinguished
Moderator
Jul 24, 2006
880
0
19,260
62
The registry only includes the correct number for versions up to DX 9.0c (4.09.* is DX9, 4.08* is DX8 etc). There doesn't appear to be any nice way to retrieve this number without hard coding assumptions except via dxdiag. I did a quick Google-fu and the only suggestions I found were using dxdiag's COM interface, parsing DX DLL version numbers or reading an XML dump from dxdiag.

For the sake of simplicity you can just look at the OS version and infer the DX version from that (if it's XP or earlier, then you can use the registry), but you'll need to keep your application updated when new Windows versions are released.
 

ASK THE COMMUNITY