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

Advertisement

abaz
Joined:
Posts:
3

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

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 = "example.com",
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?

Reply with quote

Advertisement

You can post new topics in this forum