• Advertisement

Archived

This topic is now archived and is closed to further replies.

DirectDraw4

This topic is 6544 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

For some reason, When I use LPDIRECTDRAW4, my compiler doesn''t recogise it. I can only use LPDIRECTDRAW. What is wrong? Games are the path to another dimension.

Share this post


Link to post
Share on other sites
Advertisement
I''m not really sure. Make sure that your appending the number of the version you''re using to the end, like LPDIRECTDRAW7. Actually, are you just having problems calling DirectDrawCreate? If that''s the command you''re using, try DirectDrawCreateEx(); and it might work. Hope this helped a little bit.

Share this post


Link to post
Share on other sites
If you don''t have the later versions of DirectX, LPDIRECTDRAW4 isn''t a valid identifier. Make sure the latest header files come first in your include path.

Share this post


Link to post
Share on other sites
Yeah, you probably either need to make sure that your compiler path for .lib and .h files is set to wherever the DDraw4 is defined, and I believe that you do in fact have to use the DirectDrawCreateEx like this:

hr = DirectDrawCreateEx( NULL, &m_lpDD4, IID_IDirectDraw4, NULL );

That will give you a DirectDraw4 object. Another thing that you could do is initialize a regular LPDIRECTDRAW object like you obviously know how to do, then call QueryInterface on that to get your real DirectDraw object. That''s how you have to do it in NT to get DirectX 5 to work. And, yes, Microsoft says it doesn''t work, but it does.

Pythius

Share this post


Link to post
Share on other sites
DirectDraw 4? Er, wasn''t the whole DirectX 4 package axed becuase of instability / incompatibility issues? [Sorry to go off topic]

Share this post


Link to post
Share on other sites
I''m sorry, but I too will get a bit off topic...
DIRECTDRAW4 isn''t the same as Direct X 4, which never came out. DIRECTDRAW4 is actually Direct X 6. The guys at Microsoft really has some logic going on their version numbers!!

Share this post


Link to post
Share on other sites
LPDIRECTDRAW4 is not necessarily a part of DirectX 4.0. I use DirectX 5.0 right now and all my functions like that end like this: LPDIRECTDRAW2. The number is not necessarily the DirectX SDK version number.

Share this post


Link to post
Share on other sites
If you are using Visual C++, make sure that you have the DX SDK''s include directory listed FIRST in the settings box. Also make sure you are including the correct .libs - its usually easiest just to add them to the project with an explicit path (the Project->Add files thingy does this).

Share this post


Link to post
Share on other sites

  • Advertisement