nglib.h 头文件定义
typedef void * Ng_OCC_Geometry;
DLL_HEADER Ng_OCC_Geometry * Ng_OCC_Load_STEP (const char * filename);
调用:
HINSTANCE hIns = LoadLibrary( _T("nglib.dll"));
typedef Ng_OCC_Geometry *(_stdcall *NG_OCC_LOAD_STEP)(const char * lpFileName);
NG_OCC_LOAD_STEP Ng_OCC_Load_STEP= (NG_OCC_LOAD_STEP)GetProcAddress(hIns, "[email protected]@@[email protected]");
Ng_OCC_Load_STEP(("E:\\VS2010\\2_Test_Code\\DllTest\\Debug\\Crack.stp")); //出错
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.
有大神定义过这种类型的函数吗?
------解决思路----------------------
为什么调用的时候添加了_stdcall 而声明的时候没有