ThbTapiCall.Comm
Unit: hbTapi
 

This property is used to enable the data communication feature of modems and other devices to send and receive binary data and fax information. You can use the ThbComPort component to handle the communication of binary data in your applications.

UseThbTapiCall.Comm.Available and ThbTapiCall.Comm.Handle to get a communications handle from TAPI. A received handle is closed automatically when the call leaves the connected state.

Example

procedure TForm1.hbTapiLine1CallState(Sender: ThbTapiLine; Call: ThbTapiCall; CallState: Cardinal);
begin
  case Call.State of
  LINECALLSTATE_CONNECTED :
  begin
    if Call.Comm.Available then
    begin
      hbComPort1.Handle := Call.Comm.Handle;
      try
        hbComPort1.Active := True;
      except
      end;
    end;
  end;
  else
  begin
    if hbComPort1.Active then
    begin
      hbComPort1.Active := False;
      hbComPort1.Handle := INVALID_HANDLE;
    end;
  end;
end;

The property has the following sub-properties:

Available
DeviceClass
Enabled (No longer needed)
Handle

Declaration

property Comm: ThbTapiComm;


Available (Boolean)

Availability:

Design-Time: None / Run-Time: Read

This property indicates whether the handle to the open commport is currently available. If this poroperty has a value of True, the value in the ThbTapiCall.Comm.Handle property is valid.

DeviceClass (String)

Availability:

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

The device class that is used to request a communication handle from the line device. The only legal value for this property is 'comm/datamodem', these device class consists of datamodem devices.

Enabled (Boolean)

Enabled is no longer needed. Now, the handle is queried from TAPI when ThbTapiCall.Comm.Available or ThbTapiCall.Comm.Handle is called. A received handle is closed automatically when the call leaves the connected state.

Handle (THandle)

Availability:

Design-Time: None / Run-Time: Read

This is the handle to the open comm port to be used for data commpunications. Do not attempt to open and close the data port with your communications code, ThbTapiLine and TAPI will manage this process.