i’ve written an application with “OpenGL-views” in VC++ 6. Everything
is ok. If i try to run that program in the debug mode of VC++ 7, an
error message occurs: handle not valid ( at the function:
wglDeleteContext). There are no problems in the release mode. This
error occurs also in the OpenGL examples of www.codeguru.com and www.codeproject.com and the MSDN CUBE-example.
Where is the problem ?
Check your code, you get this type of errors in debug mode, in release mode it’s ignored, that’s why you think it works, it doesn’t, you just don’t get any error messages.
Check that you don’t try to delete it two times or something like that.
thanks for your answer. I agree, it is possible, that this type of error is ingored in release mode. But this error message doesn’t occur in VC++ 6 (Win98) in the debug mode. If i try to delete it two times, it has to occur there too. Do you agree ?
Yes, try to set the handle to NULL when you have deleted it (does not help, but it’s a good way to find errors), check the handle so that it isn’t NULL before you try to delete it to see if that’s the problem, I guess it’s not as you are using it in your code, sorry I have no better idea.