Page 1 of 1

Version 10.1.1 not working in C++Builder XE5 or Alexandria

Posted: Tue 13 Sep 2022 05:25
by moppelstroppel
Hello support,

I’m using the version 10.1.1 and I try to connect to an FTP server with SFTP.
If I put the component on form an try to connect everything fine.

But if I try to implement
UnicodeString path = ".";
TScSFTPFileHandle* fHandle = ScSFTPClient1->OpenDirectory(path);

I get this error
[C++ Error] Unit1.cpp(22, 23): no viable conversion from 'System::DynamicArray<System::Byte>' (aka 'DynamicArray<unsigned char>') to 'Scsftputils::TScSFTPFileHandle *' (aka 'DynamicArray<unsigned char> *')


If I try to implement the OnDirectoryList I get an error by double click (IDE is generating the function)
The IDE shows "Error in modul Unit1: wrong decalaration of method in class TForm1"


I try to do the following.
1. Connect to an FTP server
2. Read the files in the directory
3. Download all jpg files from FTP server
4. Delete all downloaded files
5. Disconnect from FTP server

Thanks
Thomas

Re: Version 10.1.1 not working in C++Builder XE5 or Alexandria

Posted: Tue 04 Oct 2022 13:19
by MaximG
This is a known problem of the C++ Builder compiler, and we can't influence it. As a workaround, you can change TArray<System.Byte> to TBytes and assign the event handler in code at run-time instead of assigning it at design-time