The value of ESP was not properly saved across a function call. This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention.
解决方法:
1. VC6
工程->设置->C/C++->工程选项
直接把 /GZ 给去掉
2. VC.NET
项目属性->C/C++->代码生成->基本运行时检查->选择Default
(这里的/RTC会检查堆栈,去掉这个标志就行了_