delphi调用VC动态库报错,请大家帮忙看看

lihongling0994 lihongling0994 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
VC动态库的接口函数:
int Query_Pos_Card12(HANDLE icdev,LPINT CardType, LPINT Opt_Num, LPINT Serno,LPSTR Cardno,
unsgind long * CardSerno, LPINT Value,LPINT Count,LPINT UserType,,LPINT Consum_Add, LPINT use_term ,
int WaitTime)

delphi的调用函数:
Function Query_Pos_Card12(icdev : longint ;CardType : PINT ;Opt_Num : PINT ;Serno : PINT ;
Cardno : LPSTR ;CardSerno : PUINT ;Value : PINT ;Count : PINT ;UserType : PINT ;
varConsum_Add : PINT ;use_term : PINT ; WaitTime : integer):smallint; stdcall;
far;external 'yccard.dll' name 'Query_Pos_Card12';

我调用的代码:
var
i : integer;
CardType : PINT;
Opt_Num : PINT;
Serno : PINT;
Cardno : LPSTR;
CardSerno : PUINT;
Value : PINT;
Count : PINT;
UserType : PINT;
Consum_Add : PINT;
use_term : PINT;
begin
{Query_Pos_Card12(icdev : longint ; CardType : PINT ; Opt_Num : PINT ; Serno : PINT ;
Cardno : LPSTR ; CardSerno : LPUINT ; Value : PINT ; Count : PINT ; UserType : PINT ;
Consum_Add : PINT ; use_term : PINT ; WaitTime : integer) }
i := Query_Pos_Card12(icdev , CardType , Opt_Num , Serno , Cardno , CardSerno , Value , Count , UserType , Consum_Add , use_term , 500);
showmessage(inttostr(i));
end;


问题是我一调用就报内存错误,我估计是参数类型不匹配,但是我哪里出错的呢,我又找不到,请大家帮我看看
...全文

相关推荐

评论 6
收藏 已收藏
分享
返回顶部