Topic "Where can I get the example which is writed by C++ Builder?"

Author Message
[View user's profile]

Joined: 2012-05-17
Posts: 3
My program is builded by C++ Builder6. A
nd I want add a SFTP Client function to it.

I get the WINSCP.tlb by the regasm. and then get the *.h,*.cpp

by the C++ Builder's Project---->Import the type lib----->Create Unit.

Then I include the *.h and and the *.cpp to my project.

#include "WinSCP_OCX.h"
#include "WinSCP_OCX.h"
#include "mscorlib_TLB.h"
#include "mscorlib_OCX.h"

Then I use the class like follow:

SessionOptions sessionOptions = new SessionOptions {
Protocol = Protocol.Sftp,
HostName = "",
UserName = "user",
Password = "mypassword",
SshHostKey = "ssh-rsa 1024 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx"

When I compile,get the error:
[C++ Error] Main.cpp(31): E2352 Cannot create instance of abstract class '_SessionOptions'
[C++ Error] Main.cpp(31): E2353 Class '_SessionOptions' is abstract because of '__stdcall IDispatch::GetTypeInfoCount(unsigned int *) = 0'

Someone can help me?

You can post new topics in this forum


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!


About donations

$9   $19   $49   $99

About donations


WinSCP Privacy Policy

WinSCP License