unit Unit1;interfaceuses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, IdBaseComponent, IdComponent, IdTCPConnection, IdTCPClient,
IdHTTP;type
TForm1 = class(TForm)
Button1: TButton;
IdHTTP1: TIdHTTP;
procedure Button1Click(Sender: TObject);
private
procedure up;
{ Private declarations }
public
{ Public declarations }
end;var
Form1: TForm1;implementation{$R *.dfm}
procedure TForm1.up;
var s:string;
begin
try
s:=idhttp1.Get('http://www.zhcw.com/data-js/nowdata98.js');出错的地方
except
showmessage('更新失败!');
end;
if s<>'' then showmessage('更新成功!');
end;procedure TForm1.Button1Click(Sender: TObject);
var tid:dword;
begin
CreateThread(nil,0,@tform1.up,nil,0,Tid);
end;end.First chance exception at $7C812A5B. Exception class EAccessViolation with message 'Access violation at address 00482985 in module 'up.exe'. Read of address 00000364'. Process up.exe (2320)
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, IdBaseComponent, IdComponent, IdTCPConnection, IdTCPClient,
IdHTTP;type
TForm1 = class(TForm)
Button1: TButton;
IdHTTP1: TIdHTTP;
procedure Button1Click(Sender: TObject);
private
procedure up;
{ Private declarations }
public
{ Public declarations }
end;var
Form1: TForm1;implementation{$R *.dfm}
procedure TForm1.up;
var s:string;
begin
try
s:=idhttp1.Get('http://www.zhcw.com/data-js/nowdata98.js');出错的地方
except
showmessage('更新失败!');
end;
if s<>'' then showmessage('更新成功!');
end;procedure TForm1.Button1Click(Sender: TObject);
var tid:dword;
begin
CreateThread(nil,0,@tform1.up,nil,0,Tid);
end;end.First chance exception at $7C812A5B. Exception class EAccessViolation with message 'Access violation at address 00482985 in module 'up.exe'. Read of address 00000364'. Process up.exe (2320)
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货