IWICBitmapCodecProgressNotification::RegisterProgressNotification method (wincodec.h)
Registers a progress notification callback function.
Syntax
HRESULT RegisterProgressNotification(
[in] PFNProgressNotification pfnProgressNotification,
[in] LPVOID pvData,
[in] DWORD dwProgressFlags
);
Parameters
[in] pfnProgressNotification
Type: PFNProgressNotification
A function pointer to the application defined progress notification callback function. See ProgressNotificationCallback for the callback signature.
[in] pvData
Type: LPVOID
A pointer to component data for the callback method.
[in] dwProgressFlags
Type: DWORD
The WICProgressOperation and WICProgressNotification flags to use for progress notification.
Return value
Type: HRESULT
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Remarks
Applications can only register a single callback. Subsequent registration calls will replace the previously registered callback. To unregister a callback, pass in NULL or register a new callback function.
Progress is reported in an increasing order between 0.0 and 1.0. If dwProgressFlags includes WICProgressNotificationBegin, the callback is guaranteed to be called with progress 0.0. If dwProgressFlags includes WICProgressNotificationEnd, the callback is guaranteed to be called with progress 1.0.
WICProgressNotificationFrequent increases the frequency in which the callback is called. If an operation is expected to take more than 30 seconds, WICProgressNotificationFrequent should be added to dwProgressFlags.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows XP with SP2, Windows Vista [desktop apps | UWP apps] |
Minimum supported server | Windows Server 2008 [desktop apps | UWP apps] |
Target Platform | Windows |
Header | wincodec.h |
Library | Windowscodecs.lib |