CHttpQueue::Reset Method  
 
BOOL Reset(
  DWORD dwOptions  
);

The Reset method resets the state of all file transfers in the current queue.

Parameters

dwOptions
An integer value which specifies which files should be reset in the queue. It may be one of the following values:
Value Description
HTTP_QUEUE_RESET_ALL All files in the queue should be reset to their initial state.
HTTP_QUEUE_RESET_COMPLETED All files in the queue which have been successfully transferred will be reset to their initial state.
HTTP_QUEUE_RESET_FAILED All files in the queue which were not transferred will be reset to their initial state.
HTTP_QUEUE_RESET_CANCELED All files in the queue which were canceled will be reset to their initial state.

Return Value

If the method succeeds, the return value is non-zero. If the method fails, the return value is zero. To get extended error information, call GetLastError.

Remarks

When the Start method is called multiple times, it will not attempt to transfer files which have already been successfully copied, and it will not attempt to re-transfer files if the previous transfer failed. This method resets queued files back to their initial state, prior to when the queue manager attempted to perform the transfer. The most common use would be to call the method with the HTTP_QUEUE_RESET_FAILED mode and then call Start to retry failed or canceled file transfers.

Because canceled file transfers are also considered failed transfers, specifying HTTP_QUEUE_RESET_FAILED will reset queued files which either encountered an error during the transfer or were explicitly canceled by calling the Cancel method. The HTTP_QUEUE_RESET_CANCELED option will only reset the state of queued file transfers which were canceled.

Requirements

Minimum Desktop Platform: Windows 7 Service Pack 1
Minimum Server Platform: Windows Server 2008 R2 Service Pack 1
Header File: cstools12.h
Import Library: cshtpv12.lib

See Also