这是一个vb调用dll(vc6做)的高难度问题
我在vc的dll中定义了一个函数:
int far pascal __stdcall rec(int v1,int v2,int v3,short int *data)
{
....
}
我在vb里调用这个函数时声明如下:
declare rec function ...(...,ByRef data as integer)
....
dim shuju(0 to 10) as integer
call rec(a,b,c,shuju(0))
其中a,b,c是我要发送的数据,shuju(0 to 10)是我要接收的整数。
现在问题是:
有时调用此函数时没有出现问题,但有时出现如下提示:
debug error!
program d:\vb98\vb6.exe
module
file:i386\chkesp.c
line:42
The value of ESP was not properly saved across a funtion call,This
is usually a result of calling a funtion declared with one calling
conventin with a funtion pointer declared with a different calling
convention.
调用此函数出错后,以后再调用时均不正确.
这个提示好象是dll调用约定错误。
恳请各位大虾帮我看看错在哪里,不胜感激!