M
mayday
Unregistered / Unconfirmed
GUEST, unregistred user!
Delphi6 使用 SPCOMM ,使用超级终端 9600,8,None,1,None, 一切正常。
可是在程序里总是result=false
Var
ATInfo_str:string;
result :boolean;
begin
Comm1.StopComm;
Comm1.StartComm;
ATInfo_str:='ATDT=025';
ATInfo_str:=ATInfo_str+#13#10;
result:= Comm1.WriteCommData(PChar(ATInfo_str),Length(ATInfo_str)) ;
if (result = false) then
begin
Button1.Caption :='Failed';
end;
end;
可是在程序里总是result=false
Var
ATInfo_str:string;
result :boolean;
begin
Comm1.StopComm;
Comm1.StartComm;
ATInfo_str:='ATDT=025';
ATInfo_str:=ATInfo_str+#13#10;
result:= Comm1.WriteCommData(PChar(ATInfo_str),Length(ATInfo_str)) ;
if (result = false) then
begin
Button1.Caption :='Failed';
end;
end;