在一个按钮事件里!
procedure TSendFrm.Btn_sendClick(Sender: TObject);
begin
sendsms(trim(edit1.text),edit2.text);
sendsms(trim(edit1.text),edit2.text);
end;
为什么一执行完end;
后马上就弹出CPU窗口!!!!!!!????
出现
Access violation at adress 33463331 Read of Address 33463331
procedure TSendFrm.Btn_sendClick(Sender: TObject);
begin
sendsms(trim(edit1.text),edit2.text);
sendsms(trim(edit1.text),edit2.text);
end;
为什么一执行完end;
后马上就弹出CPU窗口!!!!!!!????
出现
Access violation at adress 33463331 Read of Address 33463331
var
contentlength:integer;
temp:string;
sendstring:string;
temp1,temp2,temp3:pchar;
begin
contentlength:=Unicodelength(smscontent);
temp:=Format('%3.3d',[contentlength+15]);
sendstring:='AT+CMGS='+temp;
sendstring:=SendASC(sendstring);
temp1:=pchar('86'+phonenumber);
temp2:=pchar(smscontent);
if MakePDU(temp1,temp2,temp3)=False then exit;
sendstring:=string(temp3);
sendstring:=sendstring+#26+#13;
Application.MessageBox('你好','提示',MB_OK);
sleep(100);
end;