ThbTapiPhone.DeviceID
Unit: hbTapi
 

Set this property to indicate which line device should be used. All available devices are listed in the ThbTapiPhone.DeviceList property. Legal values for this property are 0 to ThbTapiPhone.DeviceList.Count -1. The ThbTapiPhone.DeviceName property is set to the corresponding name.

Your application should not save the DeviceID to restore an user sphone configuration because it could change in due to installing/removing TAPI-devices. The better choice is to store the DeviceName. The PermanentDeviceID can be used to handel the problem of identical device names.

Example

for i := 0 to hbTapiPhone1.DeviceList.Count-1 do
begin
  hbTapiPhone1.DeviceID := i;
  if hbTapiPhone1.Available then
  begin
    ListBox1.Items.Add(hbTapiPhone1.DeviceName + ' is available');
  end;
end;

Availability

Design-Time: None / Run-Time: Read, Write

Declaration

property DeviceID: Integer;

Remarks

If the device is active prior to setting the DeviceID, then you must deactivate the component (TapiPhone.Active := False) otherwise an exception will be raised.

See Also

ThbTapiPhone.DeviceName | DeviceList | Available