procedure CancelProtocol;
Cancels the protocol currently in progress.
CancelProtocol cancels the protocol regardless of its current state. If appropriate, a cancel string is sent to the remote computer. The protocol generates an OnProtocolFinish event with the error code ecCancelRequested, then cleans up and terminates.
The following example shows how to cancel a protocol from within a protocol status dialog:
procedure TStandardDisplay.CancelClick(Sender: TObject);
begin
ApxProtocol1.CancelProtocol;
end;
See also: InProgress, OnProtocolError