Jump to content
  • Advertisement
Sign in to follow this  
cherlix

DirectDrawSurface7::Lock() runtime error

This topic is 4812 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
Advertisement
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
You could also be locking it and then not unlocking it... its really hard to say whats wrong unless you post your code..

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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!