Sign in to follow this  
MrSparkle27

[MDX] DirectX references

Recommended Posts

Hi! When running my DirectX based application on another computer, I always get a FileNotFoundException message when DirectX is not installed. Is there a way to check if the DirectX runtime dlls are installed, so I can display my own "DirectX is not installed, please download <here>." message box? Thanks in advance! Christian

Share this post


Link to post
Share on other sites
Thank you for your answer. Maybe someone could move this thread to the .NET forum.

The AppDomain.AssemblyResolve event may be the right thing, but don't I have to load the assembly using the AppDomain.CreateInstance() method then?
That would mean that I don't have the references when using VisualStudio and there will be no Intellisense :(

Share this post


Link to post
Share on other sites

IIRC the event will also fire for 'traditional' referenced assemblies, so you don't have to load them manually. As long as you hook the event before any class using the assemblies is called (ie. before the assemblies are loaded), this should work out. It's probably a good bet to hook the event in the static Program class as the first thing in your Main method.

Share this post


Link to post
Share on other sites
Just want to point out that SlimDX allows you do this cleanly and easily. (At least, it does in theory. We just got a bug report that indicates that it might've been accidentally broken, and haven't had a chance to examine it in detail yet.)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this