Share via


AsyncBase::Cancel Method

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

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

Cancels an asynchronous operation.

Syntax

STDMETHOD(  
   Cancel  
)(void);  

Return Value

By default, always returns S_OK.

Remarks

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.

Requirements

Header: async.h

Namespace: Microsoft::WRL

See Also

AsyncBase Class