DLL调用异常:The value of ESP was not properly

简介: DLL调用异常:The value of ESP was not properly

就是调用DLL的时候出错了。例如:


VS调用DLL范例_柳鲲鹏-CSDN博客


解决办法

声明时加入(或者去掉)WINAPI。具体来说:


typedef void(WINAPI *TestFunction)(char*);

需要注意的是,有时要去掉才正确。这个跟DLL函数的写法相关。

目录
相关文章
|
IDE 开发工具 C++
VS2015+Qt5.9.8编译报错:error MSB6006: “cmd.exe”已退出,代码为 2
VS2015+Qt5.9.8编译报错:error MSB6006: “cmd.exe”已退出,代码为 2
2622 0
|
4月前
|
数据采集 Windows
LabVIEW调用DLL时出现异常0xc0000005代码
LabVIEW调用DLL时出现异常0xc0000005代码
34 0
VS2005 Debug版,dll /MTd,exe /MDd 跨dll使用CString的链接错误
VS2005 Debug版,dll /MTd,exe /MDd 跨dll使用CString的链接错误
|
Java
error LNK2001: 无法解析的外部符号unresolved external symbol __imp__JNI_CreateJavaVM@12
error LNK2001: 无法解析的外部符号unresolved external symbol __imp__JNI_CreateJavaVM@12
86 0
runnerw.exe: CreateProcess failed with error 216:
runnerw.exe: CreateProcess failed with error 216:
196 0
|
iOS开发
iOS linker command failed with exit code 1 (use -v to see invocation)解决方法
iOS linker command failed with exit code 1 (use -v to see invocation)解决方法
1959 0
DLL调用异常:The value of ESP was not properly
DLL调用异常:The value of ESP was not properly
125 0
|
C++
C++ 操作DLL的函数 Loadlibrary GetProcAddress FreeLibrary
C++ 操作DLL的函数 Loadlibrary GetProcAddress FreeLibrary
771 0