Thursday 24 January 2013

Direct3DX9NotFoundException Creating a Direct3D Device With SlimDX


Yet another note for future reference. If you are using SlimDX, and you get the exception:







SlimDX.Direct3D9.Direct3DX9NotFoundException was unhandled
Message=Direct3DX 9 was not found. Please install the latest
DirectX end-user redistributable package from Microsoft.
Source=SlimDX
StackTrace:
at SlimDX.Direct3D9.Direct3D..ctor()
InnerException: System.Runtime.InteropServices.SEHException
Message=External component has thrown an exception.
Source=SlimDX
ErrorCode=-2147467259
StackTrace:
at D3DXCheckVersion(UInt32 , UInt32 )
at SlimDX.Direct3D9.Direct3D..ctor()
InnerException:





when trying to create a SlimDX.Direct3D9.Direct3D object, most likely you will be able to solve this by placing D3DX9_43.dll into your output folder. Please note that the proper solution would be to install the full DirectX 9 runtime into your system, but it may be too much for some quick testing.




A similar error may occur when using SharpDX, but in SharpDX's case, the error message will be much more helpful and actually tell you what is missing.

No comments:

Post a Comment