• Advertisement
Sign in to follow this  

Compiling DirectX9 programs for use in all DirectX9 machines?

This topic is 4350 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, I have a couple of demos which I created using the DirectX 9 SDK (October 2005), and compiled them under the RELEASE build. I have been told that when compiling under the RELEASE build, the programs should run on any DirectX 9 machine, but I am getting errors such as "dynamic..dll not found etc.". Does anyone know what I might be doing wrong? I am using VS .NET 2003 to compile the programs. I am not sure if I need to change anything under "Project Settings", or something similar. Any help would be appreciated. Thanks

Share this post


Link to post
Share on other sites
Advertisement
You have to include a dll for the D3DX part since ... I don't remember which SDK release.

Look into your system32 folder to find a dll of the form "d3dx_2x.dll" where the x change each SDK release (october should be d3dx_27.dll) And copy this dll in the same folder as the .exe. It should now run on any PC where DirectX 9.0c is installed.

Share this post


Link to post
Share on other sites
I have "d3dx9_27.dll" in my system32 folder. I'll give it a go.

Is it therefore also possible to run the demos on older version of Direct9 as long as the correct dll is installled in the exe folders?

Share this post


Link to post
Share on other sites
Quote:
Original post by shaqdx
I have "d3dx9_27.dll" in my system32 folder. I'll give it a go.

Is it therefore also possible to run the demos on older version of Direct9 as long as the correct dll is installled in the exe folders?
Only if you link to an older version of the D3DX library.
The reason you get that error is that each release of the DirectX SDK includes a new version of D3DX. That version needs to be present on the end user's machine, either by getting them to update to the latest DirectX version or by using an installer.
Microsoft does not allow you to redistribute the DLL itself, because of security issues*. If you're just giving it to a couple of friends for testing then it should be ok, but don't try putting your app up on a website with the D3DX DLLs downloadable.


* About the "security concerns": If anyone discovers an exploit in D3DX; say making a bad JPEG will cause a buffer overrun in D3DXCreateTextureFromFile(), and allow someone to execute arbitrary code then Microsoft can patch it using Windows Update. The end user with the version of D3DX with an exploit in it can be sent a patch automatically. The end user now has the patched D3DX DLL.
If you then distribute the unpatched DLL as part of your project, then it'll overwrite the patched version on the end user's machine, and allow the exploit. Worse, if you have the DLL in the same folder as your app, Windows will always load it before the verion in the system folder, so your app will always be vunerable even if the user uses Windows Update.

Share this post


Link to post
Share on other sites
Excellent. I am using the installer, safest and legal method.

I've read that before february 2005, there was no need to update the dll files, and all DirectX 9 programs would work on any machine.

Anyway, thanks for the info.

Share this post


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

  • Advertisement