|
Because Delphi supports a powerful exception mechanism, hbTapi handles most errors as Delphi exceptions. Read the documentation of a function or property to be aware of possible occuring exceptions (errors). Another error handling mechanism is used for exceptions catched during event calling und while updating TAPI data structured. In such case, first the ThbTapiApplication.OnError event is called, folowed by the ThbTapiLine.OnError resp. ThbTapiPhone.OnError event. TAPI ErrorsTAPI functions do return zero if the function succeeds or a negative error number defined by the LINEERR_ constants if an error occurs. Everytime a TAPI function called by hbTapi Components returns a negative error number, the error is indicated as a EhbTapiError exception. Some TAPI functions work in an asynchronous manner. They return immediately with an error or positive result - the request id. The real result of the function is then returned later within a TAPI reply message. When you're using hbTapi Components in an asynchronous manner, you have to use the LastRequestID property and the OnTapiReply event to get the result of an asynchronous function. Otherwise an error is immediately indicated as an exception. Procedure TForm1.DropCall(Call: ThbTapiCall); WAVE ErrorsWAVE multimedia functions do return zero if the function succeeds or a value defined by the MMSYSERR_ constants if an error occurs. Everytime a wave function called by hbTapi Components returns an error number, the error is indicated as an EWaveError exception. hbhbWaveOut1.Active := False; See AlsoThbTapiApplication.OnError, ThbTapiLine.OnError , ThbTapiPhone.OnError
|