ThbTapiPhone.LastRequestID
Unit: hbTapi
 

If the SyncMode member of the ThbTapiPhone.Options property is set to False, the component works in the normal TAPI mode. An asynchronous TAPI function will return immideatly and the RequestID of the function is stored in the LastRequestID property. The result is indicated at a later time within the ThbTapiPhone.OnTapiReply event.

Example

 TapiPhone1.Options.SyncMode := False;
try
TapiPhone1.HandSet.Volume := TTrackBar(Sender).Position;
  FRequestID := TapiPhone1.LastRequestID;
except
end;

procedure hbTapiLine1.TapiPhone1TapiReply(Sender: TObject; RequestID, ReplyCode: Cardinal);
begin
  if (RequestID = FRequestID) then
  begin
    if ReplyCode = 0 then
      // succeded
    else
      // failed, ReplyCode = PHONEERR_
  end;
end;

Availability

Design-Time: None / Run-Time: Read

Declaration

property LastRequestID: DWord;

See Also

The Synchronous/Asynchronous Model, Options.SyncMode, OnTapiReply, OnTapiTimeout