• Advertisement

Archived

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

Question about IID_IDirectDraw4 struct

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

Hello, I am learning direct draw and I am having a problem when I try to get an interface pointer. basically i get the version 1 pointer by doing... LPDIRECTDRAW lpdd = NULL; DirectDrawCreate( NULL, &lpdd, NULL ); then i get an error when i try this next step... LPDIRECTDRAW4 lpdd4 = NULL; lpdd->QueryInterface( IID_IDirectDraw4, (LPVOID *) &lpdd4 ); i get an unresolved external symbol error... error LNK2001: unresolved external symbol _IID_IDirectDraw4 if anyone knows what my problem is, please help. i think that i might not have the settings in VC6.0 set correctly. Thanks, DarkMonkey

Share this post


Link to post
Share on other sites
Advertisement
Have you added dxguid.lib and ddraw.lib to your linkers search path?
Also #include ddraw.h

Share this post


Link to post
Share on other sites
hey, thanks guys.

after i posted this, i went to bed and then relized that i forgot to copy the new ddraw.lib to the lib folder in VC++, but i didn''t know about the dxguid.lib. it''s working now, but i''m sure i''ll run into more problems

thanks,

DarkMonkey

Share this post


Link to post
Share on other sites
This seems to be an old thread. I don''t wanna create a new one since my problem is similar.
Well i #include <ddraw.h> in my files and dxguid.lib, ddraw.lib i can use LPDIRECTDRAW but i still can''t use LPDIRECTDRAW4 and DDSURFACEDESC2, etc,...
Anyhelp??

Share this post


Link to post
Share on other sites
you probably need newer headers (and libs). get them at msdn.

---
Come to #directxdev IRC channel on AfterNET

Share this post


Link to post
Share on other sites
I have downloaded the latest directx in microsoft''s site,
i''ve linked in my project, i''ve included the Directx "includes" and "libs" in my compiler options, i''ve #include <ddraw.h> #include <dxguid.h> and #define INITGUID in my project, i did anything i could do but LPDIRECTDRAW is still usable but not LPDIRECTDRAW4 nor LPDIRECTDRAW7, why? What''s going on?
I''m really going crazyyyyyyyyyyyyyyyyyyyyy

Share this post


Link to post
Share on other sites
Are the DirectX includes and libraries above the others in the list? Visual Studio searches them in order from top to bottom until it finds a files which matches.

By the way, why are you using such an old version of DirectX?

If I had my way, I''d have all of you shot!


codeka.com - Just click it.

Share this post


Link to post
Share on other sites
Thanks Dean Harding for all the help u gave.

i''ve just figured out that i needed to place the directx include and lib directories before the others. Thanx a lot

For the question of choosing the old Directx7 interface, i would like to say that it''s what i read in many books, and many guys seem to ask a lot of questions on the problem Directx8 and 2D. I don''t want to take care of that now.
is my answer sufficient?

Share this post


Link to post
Share on other sites
Oh, I though you were using DirectDraw 6. I thought it was in version 7 that they started naming the interfaces after the DirectX version (i.e. IDirectDraw7 etc) it must have only happened in version 8 though... never mind!

If I had my way, I''d have all of you shot!


codeka.com - Just click it.

Share this post


Link to post
Share on other sites

  • Advertisement