When this function is called, the queued file transfer may not
immediately stop. An internal flag is set which causes the file
transfer to exit with an error and the queue manager will begin
processing the next file in the queue. If the queue is in an idle
state, this function will fail.
It is permitted to call FtpCancelQueuedFile from within a
queue event handler to cancel the current file transfer. In this case,
the dwFileId parameter should be zero. If you specify a file
which has not been transferred, it will be flagged as canceled
and skipped by the queue manager when processing the queue. If you
specify a file which has already been processed,
this function will fail.
A canceled file transfer is also considered a failed transfer.
When you call FtpGetQueueStatus after a queued file transfer
is canceled, the dwFailedFiles member of the
FTPQUEUESTATUS structure will be
incremented to reflect this change. You can determine the status
of an individual file transfer by calling the FtpGetQueuedFile
function and checking the value of the dwQueueFlags member of the
FTPQUEUEDFILE structure.
The FtpResetQueue function can be used to reset the state of
previously canceled transfers.