Share via


IJob::GetTask method

Retrieves the specified task.

Syntax

HRESULT GetTask(
  [in]  long  taskId,
  [out] ITask **pRetVal
);

Parameters

  • taskId [in]
    The task identifier. The ITask::get_Id method contains this value.

  • pRetVal [out]
    An ITask interface that represents the retrieved task.

Return value

If the method succeeds, the return value is S_OK. Otherwise, the return value is an error code.

Remarks

If the job has not been added to the cluster, the identifiers for each task in the job will be zero. If you try to retrieve one of the tasks using zero as the identifier, the method returns the first task in the job.

Requirements

Product

Compute Cluster Pack Client Utilities

Type library

Ccpapi.tlb

See also

ICluster::ListTasks

IJob

IJob::GetEnumerator