ThbTapiLine.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 ThbTapiLine.DeviceList property. If an exact match is found, the ThbTapiLine.DeviceID property is set to the list index and and the device is initialized. If the initialization succeeds, the ThbTapiLine.Caps property is updated and the device is available. This is indicated by the ThbTapiLine.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

hbTapiLine1.DeviceName := 'Find+Phone TSP v2.0';
if hbTapiLine1.Available then
begin
  try
    hbTapiLine1.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 (ThbTapiLine.Active := False) otherwise an exception will be raised.

See Also

ThbTapiLine.DeviceID, ThbTapiLine.PermanentDeviceID, ThbTapiLine.DeviceList, ThbTapiLine.Available