SFTPConnection

This forum is not monitored by the SmartFTP staff. If you have a license please contact technical support by email.
Post Reply
m.gunesch
Posts: 16
Joined: Thu Feb 05, 2009 10:24 am

SFTPConnection

Post by m.gunesch » Fri Mar 13, 2009 2:17 pm

I have problems implementing SFTP with VB6 and ActiveX-Exe.

In the IDE everthing works fine, but as soon I try it with the compiled Exe it crashes at the Connect method of SFTPConnection:
If objSFTP.Connect = sfFTPLib.enumError.ftpErrorSuccess Then

Any ideas?

For FTP I have used the FTPConnectionSTA class:
(Use this class only if your environment doesn't support multiple threads. e.g. VB6, VBScript, JavaScript. In all other cases use the FTPConnectionMTA class instead.)

Is there also a STA class for SFTP?

Thanks in advance!

BR Markus

mb
Posts: 12029
Joined: Thu Oct 11, 2001 1:24 pm
Display name: Mat (SmartFTP)
Contact:

Re: SFTPConnection

Post by mb » Fri Mar 13, 2009 8:55 pm

Hello Markus ..

There is no STA class for the SFTPConnection object. It seems in the release build VB6 cannot handle events that come from another thread. You can try to remove all event handlers for the SFTPConnection if you have any. This is the way VBScript/Javascript works when using the SFTPConnection class.

Regards,
Mat

m.gunesch
Posts: 16
Joined: Thu Feb 05, 2009 10:24 am

Re: SFTPConnection

Post by m.gunesch » Mon Mar 16, 2009 4:17 pm

I have tried your sample project. As soon it is compiled with "WithEvents" it crashes ...
That means that with VB6 it's not possible to have a status information about transfer progress??

Because you can't show an user an up-/download without a progressbar ...

Isn't there a way to solve this?

Regards,
Markus

mb
Posts: 12029
Joined: Thu Oct 11, 2001 1:24 pm
Display name: Mat (SmartFTP)
Contact:

Re: SFTPConnection

Post by mb » Mon Mar 16, 2009 6:15 pm

Yes that's correct. Events do not work in VB6. My recommendation is to convert your project to VB.NET if possible.

Regards,
Mat

Post Reply