There is an example (in all sorts of languages) here:
Make sure you add WinSCP as a reference to your project.
do I add winscp.dll as a reference?
You may be able to do that. Even after doing the following I had to reference the DLL directly in my project because it was saying it could not find the DLL(which was strange because the object browser/intellisense was giving me access to everything in it). You will need to run RegAsm on the DLL, then it will show up under the ".NET" section when you add a reference.
Assuming .NET 4.0, and the WinSCP DLL being located at C:\WinSCP\:
Start -> Run -> %WINDIR%\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe "C:\WinSCP\WinSCP.dll" /codebase /tlb
You will also need the .exe file in the same directory as the .dll. If you get an error saying cannot find EXE, you may need to do something like this:
session.ExecutablePath = "C:\WinSCP\WinSCP.exe"
I setup a windows form sing VB2010 the code looks as follows:
I did register the winscp.dll
But at this point a need some help
how do I open winscp
tell it what options I need
such as ftp name, user name, certificate
I thank you in advance for you help.
Option Explicit On
Option Strict Off
Imports EASendMail 'ad easendmail namespace
Public Class form1
Public NotInheritable Class SessionOptions
Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
Public Sub Open(ByVal sessionOptions As SessionOptions)