Freigeben über


ICluster::ListTasks method

Retrieves all tasks in the specified job.

Syntax

HRESULT ListTasks(
  [in]  long               jobId,
  [out] IClusterEnumerable **pRetVal
);

Parameters

  • jobId [in]
    The identifier of the job whose tasks you want to retrieve. The ICluster::AddJob method returns this value. If you have an instance of the job that has already been added to the cluster, you can call the IJob::get_Id method to get the identifier.

  • pRetVal [out]
    An IClusterEnumerable interface that contains the collection of tasks. To retrieve the list of ITask interfaces, call the IClusterEnumerable::GetEnumerator method. The variant type of each item is VT_DISPATCH. Query the pdispVal member of the variant for the ITask interface. The enumerable object is empty when there are no tasks to return.

Return value

If the method succeeds, the return value is S_OK. Otherwise, the return value is an error code. To get a description of the error, call the ICluster::get_ErrorMessage method.

Requirements

Product

Compute Cluster Pack Client Utilities

Type library

Ccpapi.tlb

See also

ICluster

ICluster::ListTasksOnNode

ICluster::ListTasksWithPaging

IJob::GetEnumerator