DirectDraw4

Started by
6 comments, last by PsYcHoPrOg 24 years, 1 month ago
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.
D:
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.
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.
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
"The object of war is not to die for your country, but to make the other bastard die for his"
DirectDraw 4? Er, wasn''t the whole DirectX 4 package axed becuase of instability / incompatibility issues? [Sorry to go off topic]
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!!
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.
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).

This topic is closed to new replies.

Advertisement