IBackgroundCopyJob4::SetMaximumDownloadTime method (bits3_0.h)
Sets the maximum time that BITS will spend transferring the files in the job.
HRESULT SetMaximumDownloadTime( [in] ULONG Timeout );
Maximum time, in seconds, that BITS will spend transferring the files in the job. The default is 7,776,000 seconds (90 days).
The method returns the following return values.
The value is the maximum elapsed time that the job can spend in the CONNECTING or TRANSFERRING state. Time spent in the QUEUED or TRANSIENT_ERROR state does not count against the timeout value. The job enters the fatal error state with an error code of BG_E_MAXDOWNLOAD_TIMEOUT if the transfer time exceeds the timeout value.
Note that if the computer sleeps while BITS is transferring the job's data, the time spent sleeping will count against the timeout even though data is not being transferred.
Calling the IBackgroundCopyJob::Resume method, resets the elapsed time.
This method overrides the MaxDownloadTime group policy.
|Minimum supported client||Windows Vista|
|Minimum supported server||Windows Server 2008|
|Header||bits3_0.h (include Bits.h)|