Sign in to follow this  

DirectX Version checking

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

This topic is 4359 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.

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