WebCopy in Delphi2007 - Windows 7

Good morning,

I have a very simpel program in Delphi 10.4 that downloads a file with WebCopy, using wpSftp.
If I copy the exe + dll's, it works fine on my Windows 7 machine.

If I copy the exact same code in Delphi 2007, using the same Webcopy-version, nothing happens. The download will not start, and no events are triggered after "fileStart".

What coud be causing this ?

kind regards,

Dirk Janssens.

Do you compile for Win32 from Delphi 10.4?
You made sure ssleay32.dll and libeay32.dll are in the same folder as the EXE?

Yes, it compiled to W32.
After that, I copied the exe + libeay32.dll and libssh2.dll to the same directory my other exe is in (the one compiled with Delphi 2007).

So after that, I have on my windows 7 machine :
2 executables in the same directory,
with the exact same code,
one compiled in Delphi 10.4, and one with Delphi2007.

The Delphi2007 does not work, the other does.

I did not copy ssleay32. That dll is not in that directory.

Since you do not appear to have errors, can you step into the code and follow what happens?

In the function TWebCopy.ConnectSocket it breaks when it reaches the line
connRes := connect2(ASocket, P^.ai_addr, P^.ai_addrlen);
for the second time.
P: PAddrInfo is inaccessible :

The first time it enters the loop, it has the following values :

I set the same breakpoint in Delpho10.4, and then I see that ai_addr is assigned, so that is different in D2007, where it is nil.
What could be the cause of that ? Have I forgotten to assign a property ?? (

Do you have any idea what can be causing the difference in the P^.ai_addr value ?

I cannot see a reason for now.
Did you verify that all parameters with which getaddrinfo() is called are exactly the same on Delphi 2007 as on Delphi 10.4

The only difference is the value of "ASocket", but that is not a parameter of that function..
The screenshot shows the local variables at that point in Delphi2007 (white) and Delphi10.4 (black)

I cheked everything many times, even started a complete new project. It is very easy to reproduce. The whole code is given beneath.

So this code compiled in 10.4 works, even when I copy the exe tot the directory where my D2007 executable is on my Windows7 machine.

FYI: I never managed to get the upgrade-builder to work on this same account, usinf SFTP.
I suspect it is the same problem. After spending many hours I gave up, and used a different server (normal ftp).
Unfortunatly this account wil end soon, and I have to switch to SFTP very soon. I really hope you can find what is causing this problem.

unit mainWebCopy;


Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, WebCopy;

TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
{ Private declarations }
{ Public declarations }

Form1: TForm1;


{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
WebCopy1 : TWebCopy ;

WebCopy1 := TWebCopy.Create( self ) ;

WebCopy1.items.Clear ;
WebCopy1.items.Add ;

WebCopy1.items[0].Protocol := wpSftp;
WebCopy1.items[0].FTPHost := 'ssh.strato.com';
WebCopy1.items[0].FTPPort := 22 ;
WebCopy1.items[0].FTPUserID := 'flowerform.nl';
WebCopy1.items[0].FTPPassword := '*************************';
WebCopy1.items[0].URL := '/.cm4all/mediadb/Downloads/FF_VBN.zip' ;
WebCopy1.items[0].TargetDir := 'd:\tmp';
WebCopy1.items[0].TargetFilename := 'FF_VBN.zip' ;
WebCopy1.ShowDialog := true ;


I just did another test and hope this will help to find the cause :

I copied the directory with both executables and dll's to a Windows Home Server.

Launching the D10.4 - version it gave an error :


I copied that dll, and after that, it worked fine.

The Delphi2007-version however will still not run, and gives no error-messages.

Are there some other dll's, or versions of dll, I should be aware of ? I am running out of ideas, and start to believe this is a bug.
Can you maybe confirm that you have a working SFTP WebCopy demo running in Delphi 2007 ?

Is er al enig zicht op een oplossing voor dit probleem ?

We will ask the responsible developer when back from summer holiday next week.


This was an issue within the component. We applied a fix and the next update will contain the necessary changes.

Thank you,

Can you give me an estimate when to expect the next update ?
( days/weeks/months ?)

And can you confirm this also fixes problems I had with the update-builder ?

kind regards,


We are currently working on an update, so it will be in the coming weeks. I'll send you an incremental source update, check your forum messages.

It should be unrelated. There were SFTP related issues in the TWebUpdate component that is also used in Update Builder. Those got fixed in the meantime but we did not make a new Update Builder release yet.

Perhaps as a first step you could check if you can get TWebUpdate working with SFTP.

Hi Tünde,

With the fix everything works fine ! Thank you.
I hope you can do the same for the update-builder soon, that would be very welcome !

kind regards,


Hi Dirk,

Thank you for confirming!

Hi Tünde,

Is it possible to get a similar “quick fix”for the UpdateBuilder component ?
(I really need it on short term..)

kind regards,