Jump to content
  • Advertisement
Sign in to follow this  
hoogie

DirectX Version checking

This topic is 4570 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

I recently experienced some trouble with the d3dx.dll and as such I have become worried of other people having difficulty running my programs when using different versions of DirectX. I was wondering is there a function I can call that simply returns the DirectX version? Thanks for any help

Share this post


Link to post
Share on other sites
Advertisement
Check out the GetDXVer sample in the SDK - it does exactly what you're after [smile]

Although, I don't think you can query the presence (or lack thereof) the D3DX dll's via DSetup. You should just include the installer and call it regardless - it'll handle the case where it already exists.

hth
Jack

Share this post


Link to post
Share on other sites
Ive been looking at the GetDXVer sample and have one question. It seems that the sample returns the version of DirectX so that you can display what version is in use, how would you transfer this to only run if its above a certain version?
As they have unique identifiers you cant just say

if > needed version
run
else
exit

Really just need to ensure that my program exits cleanly if someone has an older version of DirectX.

Thanks again

Share this post


Link to post
Share on other sites
Quote:
Original post by hoogie
Ive been looking at the GetDXVer sample and have one question. It seems that the sample returns the version of DirectX so that you can display what version is in use, how would you transfer this to only run if its above a certain version?
As they have unique identifiers you cant just say

if > needed version
run
else
exit

Really just need to ensure that my program exits cleanly if someone has an older version of DirectX.

Thanks again


That is too much work for what you need. Just try to create the device you want. If the version is too low, device creation will fail. Then you can return the error message.

Share this post


Link to post
Share on other sites
You might have to make some sort of "loader" program that checks and then launches your program.

If you link to d3d9.lib then you've statically linked to the Direct3D 9 runtimes (for example), and if DX9c isn't installed you'll get a lovely system error dialog before any of your code is even executed.

There was (iirc) a "Gem" in one of the GPG books about dynamically loading the DirectX (amongst other) DLL's to get around this, but it didn't make for the most intuitive code from what I remember.

hth
Jack

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!