Run-Time Check Failure #0 – The value of ESP was not properly saved across a function call.

MFC程序,运行时报错:

Run-Time Check Failure #0 – 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.

翻译成中文,大概意思是:

运行时检查失败#0 – ESP的值没有在函数调用中正确保存。这通常是调用用一个调用约定声明的函数,用另一个调用约定声明的函数指针声明的函数的结果。

该错误,是我在工程中添加libxl库(excel读写库)后,报出的错误。

最后找到原因,我将libxl库stdcall目录下的libxl.dll拷贝到主程序软件目录下,后来,改用libxl库stdcall目录下libxl.dll,运行正常。说明,选错了dll文件,导致调用dll函数时出错。

© 版权声明
THE END
喜欢就支持一下吧,技术咨询可以联系QQ407933975
点赞0
分享
评论 抢沙发