Skip to main content
GameDev.net gamedev.net
🔒 Locked

DirectX9 problem

Started by nodoubt Jan 7, 2003 at 5:22 PM 4 replies 600+ views
Original Post
nodoubt
nodoubt
Hi I was writing a small game (im just a beginner) using the Dx7 sdk. finally downloaded the dx9 sdk today and installed it. but now when i try to run my game, an error message that I didnt write popped up "A required dll file, ddraw.dll, was not found". i looked at the docs that came with the sdk for alittle bit but couldnt find anything. any suggestions? thanks for your time
I'm a newbie, please don't hurt me!
nodoubt
nodoubt
thank you, sir. it works now.

But another problem arised, i sent the ''game'' to one of my friends and he said an error came up.

the error is due to this block in my code:

if ( FAILED( lpdd->SetDisplayMode( SCREEN_WIDTH,
SCREEN_HEIGHT, SCREEN_BPP, 0, 0 ) ) )
{
MessageBox(main_window_handle, "Cannot Set Display Mode",
"ERROR", MB_OK | MB_ICONEXCLAMATION);
return 0;
}

Could this be that his machine doesnt support 640x480x24 mode?
I'm a newbie, please don't hurt me!
zealouselixir
zealouselixir
That''s likely the cause, if you''ve narrowed it down to that section of code. If you want to know the exact reason, you could capture the HRESULT from SetDisplayMode and pass it to DXGetErrorString9 and DXGetErrorDescription9 to get a translation of the exact error.

Later,
ZE.

P.S. Those functions _should_ support DirectDraw, but since there were no new interfaces for DDraw in DX8 or DX9, you might have to use an older version of them. I don''t know where the typecasts fall...

//email me.//zealouselixir software.//msdn.//n00biez.//
miscellaneous links
[twitter]warrenm[/twitter]
IDirect3D9
IDirect3D9
First of all I need to point out that there is no such thing as 24bit mode in DirectX except for converting 24bit bitmaps to 32Bits, this is becuase 24 is NOT a power of 2. I''d check this out and then try to capture the HRESULT.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.