Topic "Using WinSCP COM with VB6"

Author Message
larrystinson
[View user's profile]

Joined: 2015-05-06
Posts: 4
Hi all,

I installed and registered the WinSCPnet.dll per the instructions, but when I open my VB6 project and select "References" from the "Project" menu and browse to the folder where I installed this file, it tells me I cannot reference the file directly.

What am I missing. I really don't want to convert this project to VB.Net. Help!

Larry
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24993
Location: Prague, Czechia
Do not browse for the file. Check WinSCP console interface .NET wrapper in the list of Available references.
See https://winscp.net/eng/docs/library_vb#using
larrystinson
[View user's profile]

Joined: 2015-05-06
Posts: 4
prikryl wrote:
Do not browse for the file. Check WinSCP console interface .NET wrapper in the list of Available references.
See https://winscp.net/eng/docs/library_vb#using


But there is nothing in the list of available references beginning with "WinSCP". That's why I was trying to browse to the file and use that.

After my post, I tried to register the .dll by using RegSvr32, but it returned the following error:

"[path]\WinSCPnet.dll was loaded but the entry-point DllRegisterServer was not found"

This is a Windows 8.1 PC BTW if that makes a difference.

Any other ideas?

Larry
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24993
Location: Prague, Czechia
Did you follow the installation instructions?
https://winscp.net/eng/docs/library_install
larrystinson
[View user's profile]

Joined: 2015-05-06
Posts: 4
prikryl wrote:
Did you follow the installation instructions?
https://winscp.net/eng/docs/library_install


Yes. I downloaded WinSCPnet.dll and WinSCP.exe and saved them to both the c:\Windows\Microsoft.Net\Framework\v4.0.30319 and the c:\Windows\Microsoft.Net\Framework64\v4.0.30319.

Then I typed in:
c:\Windows\Microsoft.Net\Framework\v4.0.30319\RegASM.exe WinSCPnet.dll /codebase /tlb in the "Run" window and pressed the "OK" button. A black command window popped up briefly and then disappeared. There were no messages of any kind, either error or confirmation.

I then did the same for the \Framework64\ directory. Same result.

Should I have received any kind of message?

After all this, when I open a VB6 project and select "References" from the "Project" menu, the only available options I have starting with "Wins" are "Winsat 1.0 Type Library" followed by "WinSimulatorUtilitiesElevated Lib", no "WinSCP".

What am I missing?

Larry
larrystinson
[View user's profile]

Joined: 2015-05-06
Posts: 4
prikryl wrote:
Did you follow the installation instructions?
https://winscp.net/eng/docs/library_install


I found the problem. I needed to open an administator command prompt and register the file from there. That worked perfectly. Thanks for your help!!

For anyone encountering the same issue, open an adminstrator command prompt in Windows 8.1 by simultaneously pressing the "Windows" and "X" keys. Then select "Command Prompt (Admin)".

Larry
mrsmalltalk
[View user's profile]

Joined: 2016-01-21
Posts: 10
hi,

below is my attempt at registering winscpnet.dll. any idea why it won't generate the type library. my goal is to use winscp in a dolphin smalltalk application.

john

////////


Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:\Windows\system32>C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe C:\
Progra~2\WinSCP\Automation\WinSCPnet.dll /codebase
Microsoft .NET Framework Assembly Registration Utility version 4.6.81.0
for Microsoft .NET Framework version 4.6.81.0
Copyright (C) Microsoft Corporation. All rights reserved.

Types registered successfully

C:\Windows\system32>
C:\Windows\system32>/tlb:WinSCPnet32.tlb
The filename, directory name, or volume label syntax is incorrect.

C:\Windows\system32>
C:\Windows\system32>
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24993
Location: Prague, Czechia
You have to execute whole command at once, not in two lines.

C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe C:\Progra~2\WinSCP\Automation\WinSCPnet.dll /codebase /tlb:WinSCPnet32.tlb
mrsmalltalk
[View user's profile]

Joined: 2016-01-21
Posts: 10
hi,

as i said in my earlier post, i'm trying to use the winscpnet.dll in dolphin smalltalk. in order to do that i need to create smalltalk wrapper methods for all the winscp functions i will use (i.e. open, get, put, close).

i've started to go thru the source directories. can you point me to the files that would have the function headers?

thanks,

john
mrsmalltalk
[View user's profile]

Joined: 2016-01-21
Posts: 10
sorry, i was looking in sources not in using as com.

john
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24993
Location: Prague, Czechia
Sorry, I have no idea what you ask for.

The open, get, etc. are script commands, not functions.

If you are looking for WinSCP .NET assembly code, see dotnet folder in WinSCP source code package.
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License