WinSCP.SessionOptions.open error

Advertisement

kiminsun
Joined:
Posts:
2
Location:
korea(seoul)

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
Last edited by kiminsun on 2024-02-26 13:11; edited 2 times in total

Reply with quote E-mail

Advertisement

kiminsun
Joined:
Posts:
2
Location:
korea(seoul)

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.

Reply with quote E-mail

martin
Site Admin
martin avatar

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?

Reply with quote

Advertisement

You can post new topics in this forum