c# DirectX version

Status
Not open for further replies.
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
 
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.
 

randomizer

Champion
Moderator
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.
 
Status
Not open for further replies.