pb9调用C++编写的DLL,调用时出现数据类型出错
Error: Specified argument type differs from required argument type at runtime in DLL function rtunyeartest.
(invalid stack pointer on return from function call) at line 16 in open event of object pbtest.
以下为C++
typedef unsigned char u_8 ;
typedef unsigned short u_16;
typedef unsigned int u_32;
typedef char i_8;
typedef short i_16;
typedef int i_32;
typedef unsigned char LI;
//AbsoluteTime
typedef struct {
u_8 century;
u_8 year;
u_8 month;
u_8 day;
u_8 hour;
u_8 minute;
u_8 second;
u_8 sec_fractions;//not used
}AbsoluteTime;
int _stdcall rtunyeartest(AbsoluteTime stuAbsoluteTime)
PB定义结构体 这里INT,LONG,STRING ,CHAR都试过了
global type absolutetime from structure
intcentury
intyear
intmonth
intday
inthour
intminute
intsecond
intsec_fractions
end type
function long rtunyeartest(ref AbsoluteTime stabsolutetime) Library "TESTDLL.dll"
AbsoluteTime lst_absolutetime
lst_absolutetime.century=21
lst_absolutetime.year =2013
lst_absolutetime.month =8
lst_absolutetime.day=12
lst_absolutetime.hour =11
lst_absolutetime.minute =11
lst_absolutetime.second =21
lst_absolutetime.sec_fractions =2
messagebox('',rtunyeartest(ref lst_absolutetime))
报开始上面的错误
[解决办法]