IBackgroundCopyJob::SetNotifyInterface method

Identifies your implementation of the IBackgroundCopyCallback interface to Delivery Optimization. Use the IBackgroundCopyCallback interface to receive notification of job-related events.

Syntax

HRESULT SetNotifyInterface(
   IUnknown *pNotifyInterface
);

Parameters

pNotifyInterface

An IBackgroundCopyCallback interface pointer. To remove the current callback interface pointer, set this parameter to NULL.

Return value

This method returns the following HRESULT values, as well as others.

Return code Description
S_OK
Notification interface pointer was successfully set.

Remarks

Call this method only if you implement the IBackgroundCopyCallback interface. Use the SetNotifyInterface method in conjunction with the SetNotifyFlags method to specify the type of notification that you want to receive.

The notification interface becomes invalid when your application terminates; Delivery Optimization does not persist the notify interface. As a result, your application's initialization process should call the SetNotifyInterface method on those existing jobs for which you want to receive notification. If you need to capture state and progress information that occurred since the last time your application was run, poll for state and progress information during application initialization.

Only the job owner/creator or an administrator can register for notifications.

Requirements

Requirement Value
Minimum supported client
Windows 10, version 1709 [desktop apps only]
Minimum supported server
Windows Server, version 1709 [desktop apps only]
Header
Deliveryoptimization.h
IDL
DeliveryOptimization.idl
Library
Dosvc.lib
DLL
Dosvc.dll
IID
IID_IBackgroundCopyJob is defined as 37668D37-507E-4160-9316-26306D150B12

See also

IBackgroundCopyJob

IBackgroundCopyCallback

IBackgroundCopyJob::GetNotifyInterface

IBackgroundCopyJob::SetNotifyFlags