exe运行时我的程序总是报下面的错误:
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.dll的函数:
void WINAPI QuarDeleteInstance(void* pPlugin)
{
delete pPlugin; return;
}exe中调用处:typedef void (*DeletePluginProc)(void*);
。
DeletePluginProc deletePluginProc;
deletePluginProc = (DeletePluginProc)GetProcAddress(hModule, _T("QuarDeleteInstance"));
IQuarantineClientPlugin* pPlugin = (IQuarantineClientPlugin*)coreInfo->clientPlugin.GetAt(i);
if(NULL != pPlugin)
{
deletePluginProc(pPlugin);
}//运行到这里报错
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.dll的函数:
void WINAPI QuarDeleteInstance(void* pPlugin)
{
delete pPlugin; return;
}exe中调用处:typedef void (*DeletePluginProc)(void*);
。
DeletePluginProc deletePluginProc;
deletePluginProc = (DeletePluginProc)GetProcAddress(hModule, _T("QuarDeleteInstance"));
IQuarantineClientPlugin* pPlugin = (IQuarantineClientPlugin*)coreInfo->clientPlugin.GetAt(i);
if(NULL != pPlugin)
{
deletePluginProc(pPlugin);
}//运行到这里报错
{
AFX_MANAGE_STATE(AfxGetStaticModuleState( )); if(pPlugin)
delete pPlugin; return;
}
。
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I ".\\" /I "..\include" /I "..\QuarantineControl" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /FR /Yu"stdafx.h" /FD /GZ /c
刚才我看到其他地方说:
在VC--》工程--》设置(PROJECT SETTINGS)-》C/C++ -》PROJECT OPTIONS 中去掉 /GZ
我这样用,但是好像没效果。
我是exe调用一个core.dll,然后这个dll再调用一个plugin.dll。现在报错的是core.dll,
上面写的“exe中调用处“其实应该是这个core.dll的代码。
不过让你们两个先说会儿。
同一个函数调用约定不同堆栈处理就不一样,我记得一个清理而另外一个不清理
用“ :( “ 的意思是比起伯虎我落后了,呵呵