有关一个dll的调用约定错误 2010-9-25 16:06

来源:互联网 发布:java高并发书籍知乎 编辑:程序博客网 时间:2024/05/16 07:12

错误信息

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.

(Press Retry to debug the application)

解决方法之一:VS2005版本以上

Project->Properties->Configuration Properties->C++->Advanced->Calling Convention, 如果原来是 __stdcall(/Gz), 换成 __cdecl(/Gd), 不然反之.

原创粉丝点击