IBackgroundCopyCallback::JobError method
Delivery Optimization calls your implementation of the JobError method when the state of the job changes to BG_JOB_STATE_ERROR.
Syntax
HRESULT JobError(
[in] IBackgroundCopyJob *pJob,
[in] IBackgroundCopyError *pError
);
Parameters
-
pJob [in]
-
Contains job-related information, such as the number of bytes and files transferred before the error occurred. It also contains the methods to resume and cancel the job. Do not release pJob; Delivery Optimization releases the interface when the JobError method returns.
-
pError [in]
-
Contains error information, such as the file being processed at the time the fatal error occurred and a description of the error. Do not release pError; Delivery Optimization releases the interface when the JobError method returns.
Return value
This method should return S_OK; otherwise, Delivery Optimization continues to call this method until S_OK is returned. For performance reasons, you should limit the number of times you return a value other than S_OK to a few times. As an alternative to returning an error code, consider always returning S_OK and handling the error internally. The interval at which this method is called is arbitrary.
Remarks
After you determine the cause of the error, perform one of the following options:
- To cancel the job, call the IBackgroundCopyJob::Cancel method.
- To accept the portion of the job that transferred successfully before the error occurred, call the IBackgroundCopyJob::Complete method. This option does not apply to upload jobs; you cannot complete a portion of an upload job.
- To finish processing the job, fix the problem, and then call the IBackgroundCopyJob::Resume method.
Transient errors do not generate calls to the JobError method.
Delivery Optimization returns BG_ERROR_CONTEXT_REMOTE_FILE if the job hit a HTTP 403 error, BG_ERROR_CONTEXT_NONE otherwise.
Requirements
Requirement | Value |
---|---|
Minimum supported client |
Windows 10, version 1709 [desktop apps only] |
Minimum supported server |
Windows Server, version 1709 [desktop apps only] |
Header |
|
IDL |
|
Library |
|
DLL |
|
IID |
IID_IBackgroundCopyCallback is defined as 97EA99C7-0186-4AD4-8DF9-C5B4E0ED6B22 |