Was deze pagina nuttig?
Uw feedback over deze inhoud is belangrijk. Laat ons weten wat u denkt.
Aanvullende feedback?
1500 tekens resterend
SetValidationState Method
EN
Deze inhoud is niet beschikbaar in uw taal, maar wel in het Engels.

IBackgroundCopyFile3::SetValidationState method

Sets the validation state of this file.

Syntax


HRESULT SetValidationState(
  [in] BOOL State
);

Parameters

State [in]

Set to TRUE if the file content is valid, otherwise, FALSE.

Return value

The method returns the following return values.

Return codeDescription
S_OK

Success

E_PENDING

You cannot validate the file until the download is complete.

BG_E_RECORD_DELETED

The cached record associated with this file has been deleted.

 

Remarks

If you set the validation state to FALSE and the file was downloaded from the origin server, the job moves to the error state with an error code of BG_E_VALIDATION_FAILED and the file progress is set to zero. You can then call the IBackgroundCopyJob::Resume method to download the file again.

BITS 3.0:  Do not call the IBackgroundCopyJob::Resume method to download the file again. Instead, call the IBackgroundCopyJob::Complete or IBackgroundCopyJob::Cancel method to cleanup the current job and then create a new job to download the file.

If you set the validation state to FALSE and the file was downloaded from a peer, BITS removes the file from the cache, resets the file progress to zero, and downloads the file again from the origin server.

You can call this method only after BITS finishes transferring the file. To receive notification when the transfer is complete, implement the IBackgroundCopyCallback2::FileTransferred method.

Calling the IBackgroundCopyJob::Complete method implicitly validates the file.

If you validate a file in the cache and then call IBackgroundCopyJob4::SetPeerCachingFlags to disable caching (or peer caching is disable through Group Policy), the file remains in the cache. If you disable caching before validating the file, BITS removes the file from the cache.

Requirements

Minimum supported client

Windows Vista

Minimum supported server

Windows Server 2008

Header

Bits3_0.h (include Bits.h)

IDL

Bits3_0.idl

Library

Bits.lib

See also

IBackgroundCopyFile3
IBitsPeerCacheRecord::IsFileValidated
IBackgroundCopyFile3::GetValidationState

 

 

Community-inhoud

Toevoegen
Weergeven:
© 2015 Microsoft