I am working with some legacy Delphi (5) code whereby I have to process a reference to an untyped method parameter.
function TPort.ReadFromBuffer(var prmBfr; prmMaxBytes: longint): longint;
I get an error on compilation "operator not applicable to this operand type" when trying to associate a value to prmBfr.
The call to ReadFromBuffer contains a dereferenced pointer as the parameter:
bytesToRead := myPort.ReadFromBuffer(fDataBfr^, bytesToRead);
Whereby fDataBfr is declared as:
TDataBuffer = array [1..65535] of char;
How am I supposed to cast for prmBfr?