Page 1 of 1

OnDirectoryList eventhandler for ScSFTPClient in C++Builder

Posted: Sun 25 Jan 2015 15:32
by ppirila
There seems to be a conflict in the parameters of OnDirectoryList event handler for ScSFTPClient in C++Builder. Activating the event handler in the RAD Studio XE7 development environment fails, but the event handler can be activated dynamically at run time with the command

ScSFTPClient->OnDirectoryList = ScSFTPClientDirectoryList;

placed in the constructot of the form, when ScSFTPClientDirectoryList is defined as the member method

void __fastcall ScSFTPClientDirectoryList(TObject *Sender, const UnicodeString Path, const TScSFTPFileHandle Handle, TScSFTPFileInfo *FileInfo, bool EOF);

Re: OnDirectoryList eventhandler for ScSFTPClient in C++Builder

Posted: Fri 30 Jan 2015 10:02
by ViktorV
This is a known problem of the ะก++Builder XE7 compiler, and we can't influence it. As a workaround you can change TArray<System.Byte> to TBytes or TScSFTPFileHandle and assign the event handler in code at run-time instead of assigning it at design-time.