#### Archived

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

This topic is 5686 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## 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 on other sites
Also #include ddraw.h

##### Share on other sites
Yeah, to use the global GUID IID_IDirectDraw4 or any of the GUIDs you need to link dxguid.lib to your project.

##### 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 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 on other sites

---
Come to #directxdev IRC channel on AfterNET

##### Share on other sites
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

Anyhelp??

##### Share on other sites
Plz don''t tell me it''s nothing to do.

##### 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 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.

##### 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.