Using WinSCP COM with VB6

Advertisement

larrystinson
Joined:
Posts:
4

Using WinSCP COM with VB6

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

Reply with quote

Advertisement

larrystinson
Joined:
Posts:
4

Re: Using WinSCP COM with VB6

martin 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

Reply with quote

larrystinson
Joined:
Posts:
4

Re: Using WinSCP COM with VB6

martin 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

Reply with quote

Advertisement

larrystinson
Joined:
Posts:
4

Re: Using WinSCP COM with VB6

martin 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

Reply with quote

mrsmalltalk
Joined:
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>

Reply with quote

martin
Site Admin
martin avatar

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

Reply with quote

mrsmalltalk
Joined:
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

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,518
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.

Reply with quote

Advertisement

You can post new topics in this forum