I am upgrading an older version of Delphi to XE5, The older version uses Indy Component UDPClient, XE5 says SendBuffer cannot be called with these arguments. Will someone please help me. Here is sample code snippet:
var
i: integer;
begin
i := bpt;
if i <> 0
begin
//send Reset byte
myBuff[i] := chr(_reset); // reboot the LIA
inc(i);
IdUDPClient1.SendBuffer(myBuff,i);
end;
end;
where myBuff : array[0..255] of char;
Thank you in advance for your help.
Mike
You need to convert your data to a
TIdBytes
, which is a dynamic array of bytes. You also have to take into account thatChar
is now 2 bytes in size, so if you need to remain compatible with an existing app, useAnsiChar
orByte
instead ofChar
:Or: