enumPorts

Declaration

Delphi

procedure enumPorts(var PortList: TPortList);

Description

Important: this function is obsolete.

Handle an variable of the type TPortList to this procedure. EnumPorts writes all available comports into PortList. Available means that the comport must exist (including virtual comports) and that the comport is not occupied by an other application.

Example:

You have 3 comports on your computer. Com1 is a real serial port but occupied by your modem driver wich is currently online. Com2 is a real serial port with nothing connected to it. Com7 is a virtual comport with a StepOver USB-Pad on it.

In that case Portlist would be looking like that:

PortList[1]='2';
PortList[2]='7';
PortList[3] to PortList[256]='0';

If there is no available comport on your computer all items in Portlist will be '0'.

Arguments

PortList

Instance of TPortList.