TApxModem.CancelCall

TApxModem

procedure CancelCall;

Terminates a connection attempt or disconnects the current call.

If a dial or an answer attempt is in progress, calling this method aborts the attempt and returns the modem to its normal state.

If you call CancelCall while the TApxModem component is in auto answer mode, the modem component is taken out of auto answer mode.

CancelCall is the TApxModem universal method for terminating the current call. It can be used while waiting for an incoming call, answering an incoming call, dialing a call, or during an established connection. TApxModem terminates the current process, assures that the modems have disconnected, and places the modem into an idle state (not waiting for calls).

CancelCall returns when the connection, or connection attempt, has terminated. The OnModemDisconnect event is generated if a connection was present when CancelCall was called; if a connection was not present, no event is generated.

See also: AutoAnswer, Dial, OnModemDisconnect