I have TMS TWebCopy 2.3 on Delphi 2010.
When i try to do this:
procedure TForm1.WebCopy1Error(Sender: TObject; ErrorCode: Integer);
begin
showmessage('Error '+inttostr(ErrorCode));
end;
and
with webcopy1.items.add do
begin
url:='ht开发者_JAVA技巧tp://zcvhxhjcgv.com/asdfsag.zip'; //fictional url, error must appear
targetdir:=tgt.text;
end;
I have NOT get any errors! When I try to download 5-10 files WebCopy can notify 1 time, but anothers - NO. WebCopy creates empty files with names from URL with sizes 921, 935 bytes.
The same situation for TForm1.WebCopy1ErrorInfo
, TForm1.WebCopy1URLNotFound
, TForm1.WebCopy1ConnectError
.
I have written to support center of TMS, I do not know they reply me with any suggestion or not.
If you have the source, Delphi might be recompiling the TWebCopy.
Implicitly substituting all strings from AnsiStrings into WideStrings.
Make a backup.
And replace all string
's into Ansistring
in the source of TWebCopy.
Recompile and see if that helps.
or
Find the original DCU of TWebCopy and put the TWebCopy source out of harms way
and let Delphi use the original DCU, instead of the recompiled Widestringed DCU.
精彩评论