Simple DirectX application won't run on anyone else's computer
Posted on 2004-08-29
I have a simple C++ DirectX project. It makes a blue rectangle. Straight out of Wendy Jones' "Beginning DirectX 9".
It compiles and runs fine on my computer. I have the latest version of the SDK installed, 9.0c (Summer 2004) that came out last week.
However, when I send the small 120k executable (in Debug configuration) or the 44k executable (in Release configuration) to anyone else and they execute it, then it just flickers on and off.
I pinpointed the problem to this line of the code:
// Create the DirectX object
if( NULL == (pD3D = Direct3DCreate9( D3D_SDK_VERSION ) ) )
The Direct3DCreate9 is returning NULL on everyone's computer but mine. I've tried installing the DirectX Runtime that came in the "Redist" folder that came with the SDK on both of the other computers, and still, both fail to create the DirectX object.
I'm running Windows Server 2003, Visual Studio .NET 2003 and DirectX 9.0c SDK (Summer 2004)
One of the computers I tested on was running Windows Server2003 and DirectX 9.0b.
I upgraded it to 9.0c using the files in the "Redist" folder and now it runs the 9.0c, but still fails to create the object.
The second computer I tested on is running Windows XP SP2 and DirectX 9.0c.
The program fails to create the DirectX object there too.
dxdiag didn't return anything interesting.
Any ideas? Why would DirectX applications developed on my workstation not run on other workstations?