“RunTime 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啦

原文地址:https://www.cnblogs.com/xingrun/p/2411959.html