C++调用dll Run-Time Check Failure #0 - The value of ESP was not properly saved across a function call.

解决:加上 WINAPI即可。我dll是WINAPI来定义的。

错误原因:定义函数指针原型时出错。

解决办法:使用相同的约定调用。( 其实函数定义没有错误,只是编译器不识别而已,比如dll是WINAPI,调用是定义是__stdcall,虽然#define WINAPI      __stdcall 但编译器会报下面的错)

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

C++调用dll Run-Time Check Failure #0 - The value of ESP was not properly saved across a function call._第1张图片 

 

 

你可能感兴趣的:(c++,开发语言)