error during session.open()

Advertisement

ba4o
Joined:
Posts:
2

error during session.open()

Hi,all!
I try to run this code on VB6:
Private Sub Form_Load()
    Dim session As New WinSCP.session
    Dim sessionOptions As New WinSCP.sessionOptions
    
    sessionOptions.Protocol = 0
    sessionOptions.HostName = "XXX.com"
    sessionOptions.UserName = "XXX"
    sessionOptions.Password = "XXX"
    sessionOptions.SshHostKeyFingerprint = "ssh-rsa 2048 XXX"
    
    session.ExecutablePath = "c:\Program Files (x86)\WinSCP\winscp.exe"
    session.DebugLogPath = "d:\copy\6.txt"
    session.SessionLogPath = "d:\copy\7.txt"
    session.Open sessionOptions
    
End Sub
but have an error on Session.Open() method: Class does not support Automation or does not support expected interface
I have installed winscp 5.1.3 and registered COM by regasm.exe. and also tried use it both two ways: registring in GAC and not

DebugLogFile:

[2013-01-30 02:26:28.261Z] [0001] Executing Assembly: WinSCP, Version=1.0.4.2881, Culture=neutral, PublicKeyToken=b5f19f5762436b89; Path: c:\Program Files (x86)\WinSCP\WinSCP.DLL; Location: c:\Program Files (x86)\WinSCP\WinSCP.dll; Product: 5.1.3.0
[2013-01-30 02:26:28.261Z] [0001] Entry Assembly:
[2013-01-30 02:26:28.261Z] [0001] Operating system: Microsoft Windows NT 6.1.7601 Service Pack 1
[2013-01-30 02:26:28.262Z] [0001] User: vova@compusha@COMPUSHA; Interactive: True
[2013-01-30 02:26:28.262Z] [0001] Runtime: 2.0.50727.5466
[2013-01-30 02:26:28.262Z] [0001] Console encoding: Input: Кириллица (Windows) (1251); Output: Кириллица (Windows) (1251)
[2013-01-30 02:26:28.262Z] [0001] Working directory: C:\Windows\system32

Any ideas?

Reply with quote

Advertisement

You can post new topics in this forum