W
weiliu
Unregistered / Unconfirmed
GUEST, unregistred user!
各位,有没有试过在华军软件园用自己写的程序下载东东,我发现下面两种方法,在别的网页上工作好好的,但到了华军就是无论下载什么软件,都只能下载到21K尺寸的不知名的东东,但用别人的软件比如影音传送带等却能成功下载,大家讨论一下原因和解决方法:
uses urlmon;
procedure TForm1.Button1Click(Sender: TObject);
begin
UrlDownloadToFile(nil, PChar('http://p2s.newhua.com/down/HA-CPU-Z135-SY.rar'), PChar('D:/HA-CPU-Z135-SY.rar'), 0, nil);
Showmessage('ok');
end;
-------------------------------------
procedure TForm1.Button1Click(Sender: TObject);
var
tmpStream:TFileStream;
begin
tmpStream:=TFileStream.Create('d:/HA-CPU-Z135-SY.rar',fmCreate);
idhttp1.HandleRedirects:=true;
try
idhttp1.Get('http://p2s.newhua.com/down/HA-CPU-Z135-SY.rar',tmpStream);
finally
tmpStream.Free;
end;
Showmessage('ok');
end;
end.
uses urlmon;
procedure TForm1.Button1Click(Sender: TObject);
begin
UrlDownloadToFile(nil, PChar('http://p2s.newhua.com/down/HA-CPU-Z135-SY.rar'), PChar('D:/HA-CPU-Z135-SY.rar'), 0, nil);
Showmessage('ok');
end;
-------------------------------------
procedure TForm1.Button1Click(Sender: TObject);
var
tmpStream:TFileStream;
begin
tmpStream:=TFileStream.Create('d:/HA-CPU-Z135-SY.rar',fmCreate);
idhttp1.HandleRedirects:=true;
try
idhttp1.Get('http://p2s.newhua.com/down/HA-CPU-Z135-SY.rar',tmpStream);
finally
tmpStream.Free;
end;
Showmessage('ok');
end;
end.