ICluster::WaitForCommand method

Waits for execution of the command to be completed on at least one node.

Syntax

HRESULT WaitForCommand(
  [in]  long               Id,
  [out] IClusterEnumerable **pRetVal
);

Parameters

  • Id [in]
    The command identifier. This is the same identifier passed to the ICluster::ExecuteCommand method.

  • pRetVal [out]
    An IClusterEnumerable interface that contains the collection of results. To retrieve the list of IExecutionResult interfaces, call the IClusterEnumerable::GetEnumerator method. The variant type of each item is VT_DISPATCH. Query the pdispVal member of the variant for the IExecutionResult interface. The enumerable object is empty when there are no results left 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.

Remarks

Call this method only if you set the ICluster::put_IsAsynchronous method to VARIANT_TRUE and called ExecuteCommand to execute the command.

To retrieve all results, call this method in a loop until all results are retrieved (the enumerable object is empty).

To get the output for each result, call the IExecutionResult::get_Output method.

Requirements

Product

Compute Cluster Pack Client Utilities

Type library

Ccpapi.tlb

See also

ICluster

ICluster::WaitForCommandWithPaging