次の方法で共有


CreateJob method of the BitsClientJob class

The CreateJob method creates a BITS transfer job with the specified parameters. Default values are used for optional parameters if values are not specified.

Syntax

uint32 CreateJob(
  [in]           string  DisplayName,
  [in]           string  RemoteUrl,
  [in]           string  LocalFile,
  [in, optional] uint16  ServiceAccount,
  [in, optional] uint16  Type,
  [in, optional] boolean Suspend,
  [in, optional] string  Description,
  [out]          string  JobId
);

Parameters

DisplayName [in]

Specifies the name of the BITS transfer job.

RemoteUrl [in]

Specifies the name of the remote file in the BITS transfer job.

LocalFile [in]

Specifies the name of the local file in the BITS transfer job.

ServiceAccount [in, optional]

Defines the context in which the BITS transfer job is created. The following values are possible:

Value Meaning
0
LocalSystem
1
LocalService
2
NetworkService (default)

Type [in, optional]

Specifies the type of BITS transfer job. This parameter can be set to one of the following values:

Value Meaning
0
Download (default)
1
Upload

Suspend [in, optional]

Specifies the BITS transfer job state immediately after creation. This parameter can be set to one of the following values:

Value Meaning
TRUE
Suspend
FALSE
Transfer immediately (default)

Description [in, optional]

Specifies the job description.

JobId [out]

Specifies the job identifier.

Requirements

Minimum supported client
None supported
Minimum supported server
Windows Server 2008 R2
Redistributable
Windows Management Framework on Windows Server 2008 with SP2
Namespace
Root\microsoft\bits
MOF
BitsProvider.mof

See also

BitsClientJob