ICancelMethodCalls::Cancel

[This is preliminary documentation and subject to change.]

Requests that the associated method call be canceled.

HRESULT Cancel (void);
 

Return Values

This method supports the standard return values E_FAIL, E_NOTIMPL, E_OUTOFMEMORY, and E_UNEXPECTED, as well as the following:

S_OK
The cancel request was received.
RPC_E_CALL_COMPLETE
The call has already returned.
RPC_E_CALL_CANCELED
The call was canceled earlier.

Remarks

The Cancel method only issues a cancel request. A return value of S_OK does not mean that the call was canceled, only that an attempt was made to cancel the call. The behavior of the cancel object on receiving a cancel request is entirely at the discretion of the implementer.

If a method call that returns an HRESULT is actually canceled, it will return RPC_E_CALL_CANCELED.

QuickInfo

  Windows NT: Use version 5.0 or later.
  Windows: Unsupported.
  Windows CE: Unsupported.
  Header: Declared in objidl.h.