UID | title | description | helpviewer_keywords | old-location | tech.root | ms.assetid | ms.date | ms.keywords | req.header | req.include-header | req.target-type | req.target-min-winverclnt | req.target-min-winversvr | req.kmdf-ver | req.umdf-ver | req.ddi-compliance | req.unicode-ansi | req.idl | req.max-support | req.namespace | req.assembly | req.type-library | req.lib | req.dll | req.irql | targetos | req.typenames | req.redist | ms.custom | f1_keywords | dev_langs | topic_type | api_type | api_location | api_name | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
NF:combaseapi.CoEnableCallCancellation |
CoEnableCallCancellation function (combaseapi.h) |
Enables cancellation of synchronous calls on the calling thread. |
|
com\coenablecallcancellation.htm |
com |
59b66f33-486e-49c3-9fb8-0eab93146ed9 |
12/05/2018 |
CoEnableCallCancellation, CoEnableCallCancellation function [COM], _com_CoEnableCallCancellation, com.coenablecallcancellation, combaseapi/CoEnableCallCancellation |
combaseapi.h |
Objbase.h |
Windows |
Windows 2000 Professional [desktop apps only] |
Windows 2000 Server [desktop apps only] |
Ole32.lib |
Ole32.dll |
Windows |
19H1 |
|
|
|
|
|
|
Enables cancellation of synchronous calls on the calling thread.
This parameter is reserved and must be NULL.
This function can return the standard return values S_OK, E_FAIL, E_INVALIDARG, and E_OUTOFMEMORY.
When call cancellation is enabled on a thread, marshaled synchronous calls from that thread to objects on the same computer can suffer serious performance degradation. By default, synchronous calls cannot be canceled, even if a cancel object is available. To enable call cancellation, you must call CoEnableCallCancellation first.
Unless you want to enable call cancellation on a thread at all times, you should pair calls to CoEnableCallCancellation with calls to CoDisableCallCancellation. Call cancellation is disabled only if CoDisableCallCancellation has been called once for each time CoEnableCallCancellation was called successfully.
A call will be cancelable or not depending on the state of the thread at the time the call was made. Subsequently enabling or disabling call cancellation has no effect on any calls that are pending on the thread.