IBackgroundCopyManager::CreateJob method
Creates a job.
Syntax
HRESULT CreateJob(
[in] LPCWSTR pDisplayName,
[in] BG_JOB_TYPE Type,
[out] GUID *pJobID,
[out] IBackgroundCopyJob **ppJob
);
Parameters
-
pDisplayName [in]
-
Null-terminated string that contains a display name for the job. Typically, the display name is used to identify the job in a user interface. Note that more than one job may have the same display name. Must not be NULL. The name is limited to 256 characters, not including the null terminator.
-
Type [in]
-
Type of transfer job, such as BG_JOB_TYPE_DOWNLOAD. For a list of transfer types, see the BG_JOB_TYPE enumeration.
-
pJobID [out]
-
Uniquely identifies your job in the queue. Use this identifier when you call the IBackgroundCopyManager::GetJob method to get a job from the queue.
-
ppJob [out]
-
An IBackgroundCopyJob interface pointer that you use to modify the job's properties and specify the files to be transferred. To activate the job in the queue, call the IBackgroundCopyJob::Resume method. Release ppJob when done.
Return value
This method returns the following HRESULT values, as well as others.
Return code | Description |
---|---|
|
Successfully generated the new job. |
Remarks
Only the user who creates the job or a user with administrator privileges can add files to the job and change the job's properties.
Requirements
Requirement | Value |
---|---|
Minimum supported client |
Windows 10, version 1709 [desktop apps only] |
Minimum supported server |
Windows Server, version 1709 [desktop apps only] |
Header |
|
IDL |
|
Library |
|
DLL |
|
IID |
IID_IBackgroundCopyManager is defined as 5CE34C0D-0DC9-4C1F-897C-DAA1B78CEE7C |