Enumerate serial ports

var
	i: integer;
	PortName: string;
	PortsCount: Word;
begin
	try
		PortsCount := FTSPCControl1.EnumSerialPorts();
		if PortsCount > 0 then
		begin
			for i := 0 to PortsCount - 1 do
			begin
				PortName := FTSPCControl1.GetSerialPort(i);

				// Todo: add your code

			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;