Requests cancellation of an outbound DCOM method call pending on a specified thread.
HRESULT CoCancelCall( DWORD dwThreadId, ULONG ulTimeout );
The identifier of the thread on which the pending DCOM call is to be canceled. If this parameter is 0, the call is on the current thread.
The number of seconds CoCancelCall waits for the server to complete the outbound call after the client requests cancellation.
This function can return the standard return values E_FAIL, E_OUTOFMEMORY, and E_UNEXPECTED, as well as the following values.
||The cancellation request was made.|
||There is no cancel object corresponding to the specified thread.|
||Call cancellation is not enabled on the specified thread.|
||The call was completed during the timeout interval.|
||The call was already canceled.|
This function does not locate cancel objects for asynchronous calls.
The object server can determine if the call has been canceled by periodically calling CoTestCancel. If the call has been canceled, the object server should clean up and return control to the client.
|Minimum supported client||Windows 2000 Professional [desktop apps only]|
|Minimum supported server||Windows 2000 Server [desktop apps only]|
|Header||combaseapi.h (include Objbase.h)|