When this method 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 method will fail.
It is permitted to call the Cancel method 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 method will fail.
A canceled file transfer is also considered a failed transfer.
When you call GetStatus after a queued file transfer is canceled,
the dwFailedFiles member of the
HTTPQUEUESTATUS structure will be
incremented to reflect this change. You can determine the status
of an individual file transfer by calling the GetFile
method and checking the value of the dwQueueFlags member of the
HTTPQUEUEDFILE structure.
The Reset method can be used to reset the state of
previously canceled transfers.