|
Summary
Abort any command or action that is in progress
Syntax
Boolean Cancel ()
Description
The Cancel method cancels any file transfer command or action that is in progress. Actions that can be aborted include trying to establish an FTP session, listing a directory, and any
directory or file manipulations. After calling this method, the application should wait for the canceled command or action to return before attempting anything else with the connection.
The Cancel method takes no parameters and returns a boolean. If a command or action is successfully canceled, then the method returns True; otherwise, it returns False. The application should ensure
that the method was successfully executed by checking the return value. The method also sets the LastResult property. The value of the LastResult property can be checked to determine if any error
occurred.
Calling this method is equivalent to setting the Action property to ACTION_CANCEL.
Example
Result = FTPClient.Cancel () If Result = False Then MsgBox "Cannot cancel current command or action", 64, "Sample Program" End If
|