“Run-Time Check failure #2 - Stack around the variable 'dlg' was corrupted”解决问题

我在程序中使用了钩子函数,然后再关闭对话框时就出现了下面问题。。。

“Run-Time Check failure #2 - Stack around the variable 'dlg' was corrupted”

半天没有解决,然后我突然想起在程序结束的时候,我没有人工释放钩子

然后,我在CXXXXApp类中覆写了函数ExitInstance,用于释放钩子,然后一切就OK啦

posted @ 2012-03-22 17:25  xingrun  阅读(1908)  评论(0编辑  收藏  举报