IBackgroundCopyJob::Cancel method
Deletes the job from the transfer queue and removes related temporary files from the client (downloads) and server (uploads).
Syntax
HRESULT Cancel();
Parameters
This method has no parameters.
Return value
This method returns the following HRESULT values, as well as others.
| Return code | Description |
|---|---|
|
Job was successfully canceled. |
|
Job was successfully canceled; however, the service was unable to delete the temporary files associated with the job. |
|
Cannot cancel a job whose state is BG_JOB_STATE_CANCELLED or BG_JOB_STATE_ACKNOWLEDGED. |
Remarks
You can cancel a job at any time; however, the job cannot be recovered after it is canceled.
For upload jobs, if the server is unavailable, there may be a delay before BITS deletes the job from the queue. BITS periodically sends a cancel request to the BITS server for up to 24 hours. If the server does not respond within the 24-hour period, BITS removes the job from the queue. If the no-progress time-out period is less than 24 hours, BITS uses the no-progress time-out period to limit the retries.
The Cancel method cancels an upload if the upload is not complete. If the upload is complete and the job is of type BG_JOB_TYPE_UPLOAD_REPLY, the method cancels the reply.
Requirements
|
Minimum supported client | Windows XP, Windows 2000 Professional with SP3 [desktop apps only] |
|---|---|
|
Minimum supported server | Windows Server 2003, Windows 2000 Server with SP3 [desktop apps only] |
|
Header |
|
|
IDL |
|
|
Library |
|
|
DLL |
|
|
IID |
IID_IBackgroundCopyJob is defined as 37668D37-507E-4160-9316-26306D150B12 |
See also
Send comments about this topic to Microsoft
Build date: 11/12/2012