Interface IBackgroundCopyCallback

Implémentez l’interface IBackgroundCopyCallback pour recevoir une notification indiquant qu’un travail est terminé, qu’il a été modifié ou qu’il est en erreur. Les clients utilisent cette interface au lieu d’interroger les status du travail.

Membres

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

Méthodes

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

Méthode Description
JobError Appelé lorsqu’une erreur se produit.
JobModification Appelé lorsqu’un travail est modifié.
JobTransferred Appelé lorsque tous les fichiers du travail ont été transférés avec succès.

Notes

Pour recevoir des notifications, appelez la méthode IBackgroundCopyJob::SetNotifyInterface pour spécifier le pointeur d’interface vers votre implémentation IBackgroundCopyCallback . Pour spécifier les notifications que vous souhaitez recevoir, appelez la méthode IBackgroundCopyJob::SetNotifyFlags .

L’optimisation de la distribution appelle vos rappels tant que le pointeur d’interface est valide. L’interface de notification n’est plus valide lorsque votre application se termine ; L’optimisation de la distribution ne conserve pas l’interface de notification. Par conséquent, le processus d’initialisation de votre application doit appeler la méthode SetNotifyInterface sur les travaux existants pour lesquels vous souhaitez recevoir une notification.

Spécifications

Condition requise Valeur
Client minimal pris en charge
Windows 10, version 1709 [applications de bureau uniquement]
Serveur minimal pris en charge
Windows Server, version 1709 [applications de bureau uniquement]
En-tête
Deliveryoptimization.h
IDL
DeliveryOptimization.idl
Bibliothèque
Dosvc.lib
DLL
Dosvc.dll
IID
IID_IBackgroundCopyCallback est défini comme 97EA99C7-0186-4AD4-8DF9-C5B4E0ED6B22

Voir aussi

IBackgroundCopyJob

IBackgroundCopyJob::SetNotifyFlags

IBackgroundCopyJob::SetNotifyInterface