Interface IBackgroundCopyError (bits.h)

Utilisez le
Interface IBackgroundCopyError pour déterminer la cause d’une erreur et si le processus de transfert peut continuer.

BITS crée un objet d’erreur uniquement lorsque l’état du travail est BG_JOB_STATE_ERROR ou BG_JOB_STATE_TRANSIENT_ERROR. BITS ne crée pas d’objet d’erreur lorsqu’une méthode d’interface IBackgroundCopyXXXX échoue . L’objet d’erreur est disponible jusqu’à ce que BITS commence à transférer les données (l’état du travail passe à BG_JOB_STATE_TRANSFERRING) pour le travail ou jusqu’à ce que votre application se termine.

Pour obtenir un objet IBackgroundCopyError , appelez la méthode IBackgroundCopyJob::GetError .

Héritage

L’interface IBackgroundCopyError hérite de l’interface IUnknown. IBackgroundCopyError a également les types de membres suivants :

Méthodes

L’interface IBackgroundCopyError possède ces méthodes.

 
IBackgroundCopyError::GetError

Récupère le code d’erreur et identifie le contexte dans lequel l’erreur s’est produite.
IBackgroundCopyError::GetErrorContextDescription

Récupère la description du contexte dans lequel l’erreur s’est produite.
IBackgroundCopyError::GetErrorDescription

Récupère le texte d’erreur associé à l’erreur.
IBackgroundCopyError::GetFile

Récupère un pointeur d’interface vers l’objet fichier associé à l’erreur.
IBackgroundCopyError::GetProtocol

Récupère le protocole utilisé pour transférer le fichier. Le nom du fichier distant identifie le protocole à utiliser pour transférer le fichier.

Configuration requise

   
Client minimal pris en charge Windows XP
Serveur minimal pris en charge Windows Server 2003
Plateforme cible Windows
En-tête bits.h

Voir aussi

BG_JOB_STATE

IBackgroundCopyCallback::JobError

IBackgroundCopyJob::GetError

IBackgroundCopyJob::GetState

IBackgroundCopyManager::GetErrorDescription