views:

423

answers:

3

I am getting the Following problem when i try to initialize the directx

SlimDX.Direct3D9.Direct3D9NotFoundException was unhandled Message="Direct3D 9 was not found. Reinstalling DirectX may fix the problem

code:

Direct3DEx m_d3dEx = new Direct3DEx();

I checked the version of Directx installed on my PC via dxdiag utility it shows that i have Directx 9c installed.

what is the cause of the problem.

Abdul Khaliq

A: 

When was the last time you installed DirectX, and what version? Also, what version of SlimDX are you using? I'm thinking that the version of DirectX you have installed is earlier than the version of SlimDX you have, which is why they dont work well with each other. I suggest you install the latest DirectX SDK, as well as the latest SlimDX.

AASoft
no it did not work i tried reinstalling the SlimDX and DirectxSDK
Abdul Khaliq
+3  A: 

My "guess" is that you aren't running Vista. Direct3DEx can only be created on a Vista machine.

Edit:

Change your code to

Direct3D m_d3d = new Direct3D();

And that "should" fix you.

Goz
yes i am trying to run it on windows xp
Abdul Khaliq
can u please guide me for windows xp
Abdul Khaliq
I have edited my answer
Goz
A: 

i have this problem too, and when i change Direct3DEx m_d3dEx = new Direct3DEx(); to Direct3DEx m_d3dEx = new Direct3DEx(); i have another problem in this line: _adapterLuid = _d3dEx*.GetAdapterLuid*(adapterOrdinal); or _deviceEx = new DeviceEx(_d3dEx, adapterOrdinal, DeviceType.Hardware, _captureHwnd, SlimDX.Direct3D9.CreateFlags.Multithreaded | SlimDX.Direct3D9.CreateFlags.SoftwareVertexProcessing, presentParams); anybody can say me what should i change insted of above line???

mahboobeh