ThbTapiPhone.DeviceName
Unit: hbTapi
 

This is the name of the telephony line device. This property can be set to the exact name of the device. All available devices are listed in the ThbTapiPhone.DeviceList property. If an exact match is found, the ThbTapiPhone.DeviceID property is set to the list index and the device is initialized. If the initialization succeeds, the ThbTapiPhone.Caps property is updated and the device is available. This is indicated by the ThbTapiPhone.Available property.

The DeviceName property is useful for your application configuration because the name of the device is less likely to change than the DeviceID. The DeviceID is assigned by the Windows operating system and may change if other devices are added or deleted. For example, save the DeviceName property when exiting your application. When starting your application retrieve the stored name and set this property.

The PermanentDeviceID can be used to handle the problem of identical device names.

Example

TapiPhone1.DeviceName := 'Find+Phone TSP v2.0';
if TapiPhone1.Available then
begin
  try
    TapiPhone1.Active := True;
  except
    // handle errors
  end;
end;

Availability

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

Declaration

property DeviceName: String;

Remarks

If the device is active prior to selecting a device then you must disable the component (TapiPhone.Active := False) otherwise an exception will be raised. Your application should not save the DeviceID to restore an users configuration because it could change in due to installing/removing TAPI-devices. The better choice is to store the DeviceName

See Also

ThbTapiPhone.DeviceID, ThbTapiPhone.PermanentDeviceID, ThbTapiPhone.DeviceList, ThbTapiPhone.Available