Jump to content
  • Advertisement
Sign in to follow this  
data2

Managed DirectX: Check if DirectX is installed

This topic is 4858 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, Currently, I'm testing a DirectX application in C# on a blank WinXP system. After installing .NET 1.1 I get an TypeInitializationException, because DirectX cannot be found. Can I somehow check whether DirectX and the correct version is installed? I found an older thread, but it was for C++: http://www.gamedev.net/community/forums/topic.asp?topic_id=216273 And another question: First, I've installed the newest redistributable (October 2005) and the program crashed with the same exception. After I installed the June 2005 version, everything was fine. Why can't I use the newest version? I thought that the exact version is only imported when developing but not for the runtime. Isn't 9.0c runtime the same for all installation versions?

Share this post


Link to post
Share on other sites
Advertisement
You could look into Microsoft.DirectX.Diagnostics. This set of api's helps you to programmably query the information that was gathered using the dxdiag tool. You could then make your assumptions from there. I will look into this as I cannot find the equavalent to the DirectSetup for native directx code.

I hope this helps.
Take care.

Share this post


Link to post
Share on other sites
Ok, I see that I can iterate through the information about the system. I tink that will work. But the main problem: If no DirectX is installed, this will fail in the same way because the Assembly (microsoft.directx.diagnostics.dll) has to be loaded. Am I right here?

Can I somehow check whether the assemblies lay in the system's GAC (global assembly cache) That doesn't have to to anything with DirectX but with available assemblies in general? Then I might be able to determine if the assembly version is correct.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!