我的dll 里有一个可被外部调用得函数dllFunc(TimeStruct* info);
TimeStruct是我在dll里定义的一个结构。我在程序里调用dllFunc()时出错(是在运行时),错误如下:
Debug Error!
Program:E:\testtimer\Debug\testtimer.exe
Module:
File:i386\chkesp.c
Line:42the value of ESP was not properly saved across a function call.This is usually a result of calling a function declared with one calling covention with a function pointer declared with a defferent calling convention.(Press Retry to debug the application)我在调用时也传了TimeStruct类型的指针过去,可就会出这样的错误
很奇怪,我在调用没有参数的dll里的函数没有错,
TimeStruct是我在dll里定义的一个结构。我在程序里调用dllFunc()时出错(是在运行时),错误如下:
Debug Error!
Program:E:\testtimer\Debug\testtimer.exe
Module:
File:i386\chkesp.c
Line:42the value of ESP was not properly saved across a function call.This is usually a result of calling a function declared with one calling covention with a function pointer declared with a defferent calling convention.(Press Retry to debug the application)我在调用时也传了TimeStruct类型的指针过去,可就会出这样的错误
很奇怪,我在调用没有参数的dll里的函数没有错,
__stdcall,__cdecl,__pascal他们的堆栈参数传递方式不一致,如果dll和调用函数不一致会出这种错误
都是,__cdecl