Partager via


Méthode IWICBitmapCodecProgressNotification ::RegisterProgressNotification (wincodec.h)

Inscrit une fonction de rappel de notification de progression.

Syntaxe

HRESULT RegisterProgressNotification(
  [in] PFNProgressNotification pfnProgressNotification,
  [in] LPVOID                  pvData,
  [in] DWORD                   dwProgressFlags
);

Paramètres

[in] pfnProgressNotification

Type : PFNProgressNotification

Pointeur de fonction vers la fonction de rappel de notification de progression définie par l’application. Consultez ProgressNotificationCallback pour la signature de rappel.

[in] pvData

Type : LPVOID

Pointeur vers les données de composant pour la méthode de rappel.

[in] dwProgressFlags

Type : DWORD

Indicateurs WICProgressOperation et WICProgressNotification à utiliser pour la notification de progression.

Valeur retournée

Type : HRESULT

Si cette méthode réussit, elle retourne S_OK. Sinon, elle retourne un code d’erreur HRESULT.

Remarques

Les applications ne peuvent inscrire qu’un seul rappel. Les appels d’inscription suivants remplaceront le rappel précédemment inscrit. Pour annuler l’inscription d’un rappel, transmettez NULL ou inscrivez une nouvelle fonction de rappel.

La progression est signalée dans un ordre croissant compris entre 0,0 et 1,0. Si dwProgressFlags inclut WICProgressNotificationBegin, le rappel est garanti pour être appelé avec progress 0.0. Si dwProgressFlags inclut WICProgressNotificationEnd, le rappel est assuré d’être appelé avec progress 1.0.

WICProgressNotificationFrequent augmente la fréquence d’appel du rappel. Si une opération doit prendre plus de 30 secondes, WICProgressNotificationFrequent doit être ajouté à dwProgressFlags.

Configuration requise

Condition requise Valeur
Client minimal pris en charge Windows XP avec SP2, Windows Vista [applications de bureau | Applications UWP]
Serveur minimal pris en charge Windows Server 2008 [applications de bureau | applications UWP]
Plateforme cible Windows
En-tête wincodec.h
Bibliothèque Windowscodecs.lib

Voir aussi

IWICBitmapCodecProgressNotification

ProgressNotificationCallback