• Advertisement

Archived

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

ddutil? where is it?

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

I wanted to blit loaded bitmaps, I read in a few articles that I needed to use DDLoadBitmap and DDCopyBitmap, which are both functions of ddutil.cpp. I couldn't find it anywhere in DX8 SDK so I downloaded it from the net. Everything was fine. I included the header file in the project and I came across no problems. Now I am introducing a new class which also needs to use ddutils.cpp, but if I include "ddutil.h" in this new class i get 89 errors, most of which look something like these: C:\Windows\Desktop\manics\ddutil.h(19) : error C2275: 'LPCSTR' : illegal use of this type as an expression C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winnt.h(167) : see declaration of 'LPCSTR' C:\Windows\Desktop\manics\ddutil.h(19) : error C2059: syntax error : ')' Although I am programming usiing DD7 objects, it is DX8 SDK that I have on my machine. Why am I getting all these errors when I try to declare ddutil.h in a second .cpp file and why is ddutil.h not part of DXSDK? has it been superceeded or something? PS all the search paths for the linker are fine i think, at least i have no problems until this second .cpp file #includes "ddutil.h" I should have mentioned, I did find a newer version of ddutil.cpp in DXSDK/samples/duel, this one is dated 2001 (wheras the one I found on the internet is dated 1999. But this newer one didnt have DDLoadBitmap ('though it did have DDutil_copyBitmap, but no DDuitil_loadBitmap) so i guess i ultimately want to know, is there a DX7 compatible version of ddutil.cpp, or, is there an equivalent .cpp file which is part of DX8 which I would be able to use instead?? Edited by - graeme on February 24, 2002 1:56:06 PM

Share this post


Link to post
Share on other sites
Advertisement
while I''m fishing for clues, I may as well add this complaint:

While waiting for a response to my first problem above, I thought that I would initialise DInput.

I have set up a DInput 8 kbrd object, following the steps described in the VXSDK tutorial. It''s a few lines long, dead simple, using the system keyboard GUI, and the right libraries are there.

It compiles fine but I get a link error:
main.obj : error LNK2001: unresolved external symbol _DirectInput8Create@20
Release/manic miner.exe : fatal error LNK1120: 1 unresolved externals

This isn''t because I am using DD 7 and DI 8 at the same time is it? I can''t work this out either!


Share this post


Link to post
Share on other sites
Using Windows'' Find Files, I pointed the search at the root of my SDK install and searched for ddutil.cpp. It found:
D:\SDK\Microsoft SDK\Samples\Multimedia\Common\src\ddutil.cpp

Similarly, searching for ddutil.h shows:
D:\SDK\Microsoft SDK\Samples\Multimedia\Common\include\ddutil.h

Your paths will obviously not be the same as mine.

Stay Casual,

Ken
Drunken Hyena

Share this post


Link to post
Share on other sites
Like I said I have them as part of samples/multimedia/duel , but these later versions don''t suppotr DDLoadBitmap (from a disc.) Are the ones you found dated 2001, and do they have the function DDLoadBitmap. If not then my initial questions still stand true... why would including the ddutil.h header (from 1999) in one .cpp act fine, but then introducing another file which declares ut screw everything up? And if DDLoadBitmap is not a part of the latest (2001) version of ddutil, then what has replaced it?

Share this post


Link to post
Share on other sites
I noticed this too when migrating from Dx7 to 8. I just copied the OLD ddutil.h/.c into the same folder as my project and added it to my project. Don''t know why Microsoft mucked about with ddutil. Looks like they were trying to make it more like the d3d8 framework.

You CAN use DInput8 and DirectDraw7 quite happily. Looks to me like you didn''t include the lib for dinput into your project from the error.

Neil

WHATCHA GONNA DO WHEN THE LARGEST ARMS IN THE WORLD RUN WILD ON YOU?!?!

Share this post


Link to post
Share on other sites
thedo: this is exactly what i mean! what happened to ddLoadBitmap? No sooner had I learned to use it then it becomes unavailable. Could you do me a favour and email me your ddutil files from DX7?? I have a feeling this will solve my troubles. ta

Share this post


Link to post
Share on other sites
Yeah- I''ll need to dig it out - i''ve not used directdraw for a while (at least a couple of clean windows installs anyway) but i''ll sort that for you later today.

Neil

WHATCHA GONNA DO WHEN THE LARGEST ARMS IN THE WORLD RUN WILD ON YOU?!?!

Share this post


Link to post
Share on other sites

  • Advertisement