Write data from safe array

var
	DataToWrite: array[1..5] of byte;
	i: integer;
begin
	try
		for i := 0 to Length(DataToWrite)-1 do
			DataToWrite[i] := i;

		FTSPCControl1.WriteArray(DataToWrite);

	except
		on e:FTSPCException do
		begin
			application.MessageBox(PChar('Error: ' + 
				inttostr(e.ErrorCode) + ' - ' +
				e.ErrorSource), 'Error!', MB_OK + 
				MB_ICONERROR);
		end;
	end;
end;