C++ Builder 10.3 cannot create some events

Discussion of open issues, suggestions and bugs regarding network security and data protection solution - SecureBridge
Post Reply
RobinP
Posts: 7
Joined: Mon 08 Jun 2020 12:16

C++ Builder 10.3 cannot create some events

Post by RobinP » Mon 08 Jun 2020 13:27

Hi, I've just downloaded the trial version of SecureBridge (sbridge26.exe) and am using it with C++ Builder 10.3. I've managed to get the basic file upload working which is all I need, but cannot create some of the events. When I try to create the event I get the message "Incorrect method declaration" from the IDE. It looks like something to do with the use of TArray which is being used in the event handler function signature, but is not being set up with the correct C++ syntax. E.g. for the TScSFTPClient OnSuccess event I get the following:

Code: Select all

ScSFTPClientSuccess(TObject *Sender, TScSFTPOperation Operation, const UnicodeString FileName,
          const TArray<System.Byte> Handle, const UnicodeString Message);
A similar thing happens for some other events as well, such as OnError/AfterWriteData etc.

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: C++ Builder 10.3 cannot create some events

Post by ViktorV » Fri 12 Jun 2020 09:15

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.

RobinP
Posts: 7
Joined: Mon 08 Jun 2020 12:16

Re: C++ Builder 10.3 cannot create some events

Post by RobinP » Fri 12 Jun 2020 12:17

Ok thx that works.

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: C++ Builder 10.3 cannot create some events

Post by ViktorV » Fri 19 Jun 2020 06:32

Thank you for the interest to our product.
It is good to see that the problem has been solved.
If you have any questions during using our products, please don't hesitate to contact us - and we will try to help you solve them.

Post Reply