读取短信的问题,谢谢!

ylvb 2007-03-14 08:23:32
procedure TForm1.Button5Click(Sender: TObject);
var
jd:tjindismscontrol;
oa:widestring;
time:widestring;
phoneno:widestring;
msg:widestring;
begin
jd:=tjindismscontrol.Create(nil);
jd.Settings:='9600,N,8,1';
jd.CommPort :=strtoint(edit2.text);//RS_commport;
jd.CenterNo:='+8613010112500';
if jd.IsOpen then
begin
exit;
end;
if not jd.OpenCom=0 then
begin//设备打开失败;
exit;
end;
if jd.ReadMsgForIndex(oa,msg,time,edit4.Text)=0 then//执行到此处老提示无效的过程调用或参数,检查多边没发现问题,不知道是什么原因?
begin//读取成功
edit5.Text :=msg;
end;
try
IF jd.IsOpen then jd.CloseCom
except
end;
end;
...全文
289 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
meiZiNick 2008-05-01
  • 打赏
  • 举报
回复
不会,帮顶
ylvb 2007-03-18
  • 打赏
  • 举报
回复

发现这样就可以了:
sleep(2200);
if jd.ReadMsgForIndex(oa,msg,time,edit4.Text)=0 then。。。。。。。。

郁闷,什么原因呢?


dongfanghui 2007-03-15
  • 打赏
  • 举报
回复
那要看你的jd.ReadMsgForIndex函数怎么写的了。
用的是现成的控件啊,自己写啊。

3,846

社区成员

发帖
与我相关
我的任务
社区描述
硬件/嵌入开发 无线
社区管理员
  • 无线
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧