Read data
procedure TForm1.FTSPCControl1Receive(Sender: TObject; Count: Cardinal); var ReadBuffer: array of byte; ReadCount: DWORD; i: integer; begin try SetLength(ReadBuffer, Count); ReadCount := FTSPCControl1.Read(@ReadBuffer[0], Count); if ReadCount > 0 then begin for i := 0 to ReadCount - 1 do begin Memo_Terminal.Text := Memo_Terminal.Text + char(ReadBuffer[i]); end; end; except on e:FTSPCException do begin application.MessageBox(PChar('Error: ' + inttostr(e.ErrorCode) + ' - ' + e.ErrorSource), 'Error!', MB_OK + MB_ICONERROR); end; end; end;