HP Operations Manager for Windows

IOvRemoteAgent::Cancel


Interrupts the asynchronous operation.

HRESULT Cancel([out, retval] VARIANT_BOOL* pbCanceling);

Parameters

None.

Returning Parameter

pbCanceling
If Canceling was initiated, VARIANT_TRUE is returned on this parameter. Otherwise, VARIANT_FALSE is returned.

HRESULT Return Values

S_OK
Canceling was initiated.

S_FALSE
Canceling was not initiated.

(FAILED)
An error occurred. IErrorInfo was created. A detailed error description is traced.

Description

The Cancel method is used to interrupt asynchronous operation. If there is no asynchronous operation in progress, it returns immediately. First, the OnCancel event is executed (see the description of the _IOvRemoteAgentEvents interface). Users are asked if they really want to cancel the asynchronous operation (double check). If the user decides not to cancel the operation, the method returns immediately with VARIANT_FALSE, and nothing happens. If the user decides to cancel, canceling is initiated, and the method returns with VARIANT_TRUE.

The Cancel method does not immediately interrupt the asynchronous operation. Instead, it initiates the canceling operation. After the asynchronous operation finishes with the current node, it is interrupted, and does not continue with the remaining nodes.