ThbTapiLine.LastRequestID
Unit: hbTapi
 

If the SyncMode member of the ThbTapiLine.Options propety 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 ThbTapiLine.OnTapiReply event.

Example

hbTapiLine1.Options.SyncMode := False;
try
  hbTapiLine1.MakeCall('8586');
  FMakeCallRequestID := hbTapiLine1.LastRequestID;
except
end;

procedure hbTapiLine1.hbTapiLine1TapiReply(Sender: TObject; RequestID, ReplyCode: Cardinal);
begin
  if (RequestID = FMakeCallRequestID) then
  begin
    if ReplyCode = 0 then
      // MakeCall succeded
    else
      // MakeCall failed, ReplyCode = LINEERR_
  end;
end;

Availability

Design-Time: None / Run-Time: Read

Declaration

property LastRequestID: DWord;

See Also

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