Advertisement

DX7 IID_IDirectDraw4 stuff....

Started by August 19, 2000 05:29 AM
4 comments, last by Sponge99 24 years, 4 months ago
I, again, am reading "Tricks of the Windows...." and am trying to do the lpDD->QueryInterface() thingy. It says I put in what I want to query, and in the book, it says it should be "IID_IDirectDraw4". When I compile, it gives me an error saying that "IID_IDirectDraw4" is not known. ???!. I''ve include Ddraw.h or whatever it is, and the lib, too (it knows the rest of the stuff). I even see IID_DirectDraw4 in the ddraw.h header! Aghh!
	
if (lpdd->QueryInterface(IID_IDirectDraw4,(LPVOID*)&lpdd4) != S_OK)
{
	DestroyDDraw(hWnd);
	return false;
}
 
That''s about it....can ya help? Thanx alot! Dare wa neko o koroshiteimasuka?
"Now watch as I run away in a womanly fashion." - Batman
You need to set DirectX SDK''s include directory in: Tools->Options->Directories.
Add the lib directory and the include directory.



The road to success is always under construction
Goblineye EntertainmentThe road to success is always under construction
Advertisement
I had the same problem. In the end/after the DDraw chapter, Lamothe mentions that you should link with "dxguid.lib" if you''re having problems with IID_IDirectDraw4. Try linking with dxguid.lib and everything should be fine.
I'm reminded of the day my daughter came in, looked over my shoulder at some Perl 4 code, and said, "What is that, swearing?" - Larry Wall

.-Yesterday I resplied this question... As Muzzafarath says
you must link to dxguid.lib OR at the beginning of your main source code(tipycally main.cpp) put #define INITGUID.

.-That´s all folks...

What the hells!
What the hells!
Ooops, sorry. I changed IID_IDirectDraw4 to IID_IDirectDraw2 and everything worked fine. Please tell me all of the other function will behave properly bases on this (I'm using DX7, not 6 like Lamothe). Sorry for all the ranting, thanks for the input. Linking in dxguid.lib helped -- it made all the difference.

PS: I woulda killed previous message, but I just want to edit it. Here's what I would have said if it still didn't work:


Ugh. I linked in dxguid.lib, and still the same error. I even added those two directories in my tools->options area, I don't know what that would solve, but......I did it. Defining INIT_GUID didn't help either.

Argh! Are there anyother specific .h files or libraries? I'm getting a tad pissed....this guy needs to fix his dern book.


Thanx again! (Moral: .lib's. you can't live w/ 'em, can't live w/out 'em)

Edited by - Sponge99 on August 19, 2000 10:35:01 AM
"Now watch as I run away in a womanly fashion." - Batman
Make sure that when you add the include directory you add it to the top of the list. If it''s at the bottom, it will include the version of DX that comes with Visual C++ instead of the one you want.

----------------------------------------
Who is this General Failure and why is he trying to read my hard disk?

This topic is closed to new replies.

Advertisement