IBackgroundCopyJob::SetNotifyFlags method

Specifies the type of event notification you want to receive, such as job transferred events.

Syntax


HRESULT SetNotifyFlags(
  [in]  ULONG NotifyFlags
);

Parameters

NotifyFlags [in]

Set one or more of the following flags to identify the events that you want to receive.

ValueMeaning
BG_NOTIFY_JOB_TRANSFERRED
0x0001

All of the files in the job have been transferred.

BG_NOTIFY_JOB_ERROR
0x0002

An error has occurred.

BG_NOTIFY_DISABLE
0x0004

Event notification is disabled. BITS ignores the other flags.

BG_NOTIFY_JOB_MODIFICATION
0x0008

The job has been modified. For example, a property value changed, the state of the job changed, or progress is made transferring the files. This flag is ignored if command line notification is specified.

BG_NOTIFY_FILE_TRANSFERRED
0x0010

A file in the job has been transferred. This flag is ignored if command line notification is specified.

 

Return value

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

Return codeDescription
S_OK

Type of event notification was successfully set.

E_NOTIMPL

The NotifyFlags value is not valid.

BG_E_INVALID_STATE

The state of the job cannot be BG_JOB_STATE_CANCELLED or BG_JOB_STATE_ACKNOWLEDGED.

 

Remarks

Use the SetNotifyFlags method in conjunction with the IBackgroundCopyJob::SetNotifyInterface and IBackgroundCopyJob2::SetNotifyCmdLine methods to receive event notification.

Examples

See the example code for the IBackgroundCopyJob::SetNotifyInterface method.

Requirements

Minimum supported client

Windows XP

Minimum supported server

Windows Server 2003

Header

Bits.h

IDL

Bits.idl

Library

Bits.lib

DLL

QmgrPrxy.dll

IID

IID_IBackgroundCopyJob is defined as 37668D37-507E-4160-9316-26306D150B12

See also

IBackgroundCopyCallback
IBackgroundCopyCallback2
IBackgroundCopyJob::GetNotifyFlags
IBackgroundCopyJob::SetNotifyInterface
IBackgroundCopyJob2::SetNotifyCmdLine

 

 

Community Additions

ADD
Show:
© 2014 Microsoft