I'm switching to delphi from c++ builder. I am rewriting part of the application from C++ to Delphi.
I use the CPortLib component for serial communication there the write and read function worked for me in C++ without problems.
The pointer to the char array pointed to the data. for delphi the function is defined as:
TcustomComPort.Write(void type, integer)
function Write(Const Buffer, Count integer)
TcustomComPort.Reade(void type@, integer)
function Read(var Buffer; Count: Integer): Integer;
The write / read functions give incorrect data.
Can you advise how to enter the first parameter for the read / write function in Delphi?
PS: if I use WriteLn, ReadLn and enter the data in a string, it works fine. Thank you for your response 🙂