IBackgroundCopyManager::EnumJobs method

Retrieves an interface pointer to an enumerator object that you use to enumerate the jobs in the transfer queue. The order of the jobs in the enumerator is arbitrary.

Syntax

HRESULT EnumJobs(
  [in]  DWORD                   dwFlags,
  [out] IEnumBackgroundCopyJobs **ppEnumJobs
);

Parameters

  • dwFlags [in]
    Specifies whose jobs to include in the enumeration. If dwFlags is set to 0, the user receives all jobs that they own in the transfer queue. The following table lists the enumeration options.

    Option Meaning
    BG_JOB_ENUM_ALL_USERS

    Includes all jobs in the transfer queue—those owned by the user and those owned by others. The user must be an administrator to use this flag.

     

  • ppEnumJobs [out]
    An IEnumBackgroundCopyJobs interface pointer that you use to enumerate the jobs in the transfer queue. The contents of the enumerator depend on the value of dwFlags. Release ppEnumJobs when done.

Return value

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

Return code Description
S_OK

Successfully generated enumerator object.

E_ACCESSDENIED

The user must be an administrator or belong to an administrator group to enumerate jobs owned by another user.

 

Requirements

Minimum supported client

Windows 10, version 1709 [desktop apps only]

Minimum supported server

Windows Server 2016 [desktop apps only]

Header

Deliveryoptimization.h

IDL

DeliveryOptimization.idl

Library

Dosvc.lib

DLL

Dosvc.dll

IID

IID_IBackgroundCopyManager is defined as 5CE34C0D-0DC9-4C1F-897C-DAA1B78CEE7C

See also

IBackgroundCopyManager

IBackgroundCopyManager::GetJob

IBackgroundCopyJob::EnumFiles