scp home

SCP ActiveX provides asynchronous file transfers. This means when you send a large file, the GUI does not block. This is extremely useful for Visual Basic and other  single threaded applications. You have a choice to wait until transfer is complete or you can set an event which will be fired after the end of transmission.

How to send/receive files from Windows to Linux/Unix with ...

ASP


Set SCPObj = CreateObject ("Network.MySCP")
SCPObj.SendFile "192.168.0.1",22,"root","toor","c:\temp\*.html","/home/john/public_html/"
SCPObj.WaitForComplete

C#

SCPLib.MySCP scp ;

/* set events if you need them */

scp = new SCPLib.MySCPClass ();

scp.OnError += new SCPLib._IMySCPEvents_OnErrorEventHandler(OnSCPError);

scp.OnConnect += new SCPLib._IMySCPEvents_OnConnectEventHandler(OnSCPConnect);

scp.OnDisconnect += new SCPLib._IMySCPEvents_OnDisconnectEventHandler(OnSCPDisconnect);

scp.OnProcessFile += new SCPLib._IMySCPEvents_OnProcessFileEventHandler(OnProcessFile);

scp.OnAbsentFingerprint += new SCPLib._IMySCPEvents_OnAbsentFingerprintEventHandler(OnAbsentFingerprint);

scp.SendFile ("hostname.com", 22, "john", "nhoj", "c:\windows.swp", "/tmp/");

/* Waiting is not needed, you will get event anyway */

scp.WaitForComlpete();

Visual Basic

Set SCPComp = New MySCP

SCPComp.ReceiveFile "hostname.com", 22, "john", "nhoj", "/tmp/*.html", "c:\downloaded\"

SCPComp.WaitForComlpete

C++

in "stdafx.h" include the following line:

#import "MySCP.dll" no_namespace

.... later you can use it:

SCPLib::IMySCPPtr pftpSCP;

pftpSCP.CreateInstance(__uuidof(SCPLib::MySCP));

pftpSCP->put_AbsentKeyPolicy(SCPLib::KEYPOLICY_CACHE);

pftpSCP->put_DifferentKeyPolicy(SCPLib::KEYPOLICY_CACHE);

 pftpSCP->SendFile("192.168.244.128",22,"root","test","C:\bigzip.zip","/tmp/");

pftpSCP->WaitForComplete(); // Wait until transaction is complete

SCPLib::SCPERROR err;

pftpSCP->get_Error(&err);

if ( err !=  SCPLib::SCPERR_NO_ERRORS ) AfxMessageBox ("Error");

pftpSCP.Release();

 

Browse our Online Manual for more details.

(c) Activecrypt Software LLC, 2004-2006