Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: WinSCP.SessionOptions.open error

What is Visual Basic 10? Is this really the old/legacy Visual Basic? Or VB.NET?
If it is the old Visual Basic, how do you start legacy VB project in modern Visual Studio?
kiminsun

Re: WinSCP.SessionOptions.open error

martin wrote:

You didn't tell us anything about the error you are getting.


sorry.
I have corrected and uploaded the parts with errors. The log file is also attached.
Please help.
martin

Re: WinSCP.SessionOptions.open error

You didn't tell us anything about the error you are getting.
kiminsun

WinSCP.SessionOptions.open error

Hello.
Using winscpnet.dll
I am developing a program in VB to transfer files using the SFTP protocol.
However, in the connection part I got an error.
Please reply.
OS: Windows 2019
Visual Studio 10
visual Basic 10
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\RegAsm.exe "C:\Program Files (x86)\WinSCP\WinSCPnet.dll" /codebase /tlb:WinSCPnet64.tlb

came out
The WinSCPnet64.tlb file was developed after registering it with com+

Dim mySession As New Session   
Dim mySessionOptions As New SessionOptions
 
mySessionOptions.Protocol = Protocol_Sftp
mySessionOptions.HostName = "innok.kr"
mySessionOptions.UserName = "isis1218"
mySessionOptions.Password = "aprmay05!"
mySessionOptions.SshHostKeyFingerprint = "ssh-ed25519 255 RCLF546XfY4PtQ5yKspDqAdzG700+VEJrtMvbo6MhGU"
mySessionOptions.PortNumber = 22
 
mySession.DebugLogPath = "c:\vb\FTP.log"
mySession.Open (mySessionOptions)
' ======== > error Run-time error '5' Invalid  procedure call or argument 
 
Dim myTransferOptions As New TransferOptions
 
myTransferOptions.TransferMode = TransferMode_Binary
 
' Disconnect, clean up
mySession.Dispose
 
' Restore default error handling
On Error GoTo 0