IBackgroundCopyJob::SetPriority method (bits.h)

Specifies the priority level of your job. The priority level determines when your job is processed relative to other jobs in the transfer queue.

Syntax

HRESULT SetPriority(
  [in] BG_JOB_PRIORITY Val
);

Parameters

[in] Val

Specifies the priority level of your job relative to other jobs in the transfer queue. The default is BG_JOB_PRIORITY_NORMAL. For a list of priority levels, see the BG_JOB_PRIORITY enumeration.

Return value

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

Return code Description
S_OK
Job priority was successfully set.
E_NOTIMPL
The value for Priority is not defined in the BG_JOB_PRIORITY enumeration.
BG_E_INVALID_STATE
The state of the job cannot be BG_JOB_STATE_CANCELLED or BG_JOB_STATE_ACKNOWLEDGED.

Requirements

Requirement Value
Minimum supported client Windows XP
Minimum supported server Windows Server 2003
Target Platform Windows
Header bits.h
Library Bits.lib
DLL QmgrPrxy.dll

See also

BG_JOB_PRIORITY

IBackgroundCopyJob::GetPriority