AsyncBase::Cancel Method


The new home for Visual Studio documentation is Visual Studio 2017 Documentation on

The latest version of this topic can be found at AsyncBase::Cancel Method.

Cancels an asynchronous operation.


By default, always returns S_OK.

Cancel() is a default implementation of IAsyncInfo::Cancel, and does no actual work. To actually cancel an asynchronous operation, override the OnCancel() pure virtual method.

Header: async.h

Namespace: Microsoft::WRL

AsyncBase Class