I am porting an application from BCB 5 with Indy 9 to Borland C++ Builder 2007 using Indy 10
The Indy 9 SendBuffer function for a UDP server has two parameters for the data to send; being a char * and a length specifier.
Indy 10 makes it more complicated by introducing a single parameter of type TIdBytes which passes the same information.
The question is, how to generate a TIdBytes variable from a char * and length ? A function such as
TIdBytes MakeTIdBytes(char *data,int length); is required
The only way I can see to do this is something like the following which is a bit arcane if you want to send
a packet of a few hundres bytes :-
TIdBytes MakeTIdBytes(char *data,int length)
r[i] = data[i];