Sign in to follow this  

DirectDrawSurface7::Lock() runtime error

This topic is 4597 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 have created a surface, then I want to lock it to draw something on it. But when the program run at the DirectDrawSurface::Lock(), it will be terminated~~~ and the windows system show a dialog to me, the content below: ----------------------------------------------------- |Debug Error! | |Program: | |....................(program_path and program_name) | | | |DAMAGE: after Normal Block (#18) at 0x00780EC0 | | | | Terminte Retry Ignore | ----------------------------------------------------- No matter what I choose, the program will terminate. I use the VC6.0 Debugger to debug the program. When the debugger run at the Lock(), the Lock() never return back to my program then the program terminate and no dialog displays.(I use the watch window to see the surface var is valid, it's a DirectDrawSurface pointer, and see the memory address of 0x00780EC0, find the value is zeros) I want to know what happened~~~~ and how to solve the problem. Thanks a lot~~~~

Share this post


Link to post
Share on other sites
Please post the lines in which you lock the surface, and all the lines that declare the variables used in the lock call. It looks like you mishandle the locked data pointer somehow.

Also, does the surface work if you don't lock it?

Share this post


Link to post
Share on other sites
Thanks a lot for your replays~~~ I have found the reason.
Because when I create surface, I set a invalid flag. But the create surface func didn't report the error, and create surface success. So this point confuse me~~~

Share this post


Link to post
Share on other sites

This topic is 4597 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this