Archived

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

Saandman

Evil DDSURFACEDESC2 problem

Recommended Posts

I get an error trying to create a DD surface. It complains about "cannot convert parameter 1 from ''struct _DDSURFACEDESC2 *'' to ''struct _DDSURFACEDESC *" notice the "2" is removed in the last appearance. What typecast do you need here? Or is there any other solution besides using previous versions of the interfaces...
quote:
DDSURFACEDESC2 ddsd; ... lpdd7->CreateSurface(&ddsd, &lpddsPrimary, NULL);
/Sandman

Share this post


Link to post
Share on other sites
it sounds like the function you are using is for an older version of DirectDraw.....make sure you are using the latest function which is like CreateSurfaceEx(....) or something. Or when you are creating the device, use CreateDeviceEx(....) or something like that.

"I pity the fool, thug, or soul who tries to take over the world, then goes home crying to his momma."
- Mr. T

Share this post


Link to post
Share on other sites
I solved it! I took a quick peek in the ddraw.h (DirectX 8.0a SDK which I use) and saw that I had declared a LPDIRECTDRAW lpdd; object instead of the latest LPDIRECTDRAW7 lpdd;

:D

So I guess you lead me onto track dude thankz

/Sandman

Share this post


Link to post
Share on other sites