tags:

views:

376

answers:

4

How can i find the current install version of directx on my system using code(C#).

A: 

On xp you can check "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DirectX" registry for DirectX version

ArsenMkrt
"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DirectX" showing me 4.09.00.0094 while i have 9.0C install on my machine, although i also want that my could should work on vista as well.
Firoz
InstalledVersion key is 9, I don't know how you can get letter C, you have installed 9c(4.09.00.0094), isn't it? unfortunately it will not work on vista...
ArsenMkrt
A: 

I realize that it's slightly off topic...

You might want to look into using SlimDX as a managed DirectX wrapper instead of Managed DirectX, since Microsoft has dropped support for 64-bit DirectX in Managed DirectX.

GregC
A: 

What about dynamically requesting different versions of DirectX objects through COM via the CoCreateInstance call? Check for fail conditions which would indicate a version is not available. Check one-by-one with the latest version until you get an object successfully.

Kieveli
A: 

I found the solution Here, This code is in C++, but we can easily convert into managed code.

Firoz