AsyncBase::TryTransitionToError 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::TryTransitionToError Method.

Indicates whether the specified error code can modify the internal error state.

bool TryTransitionToError(  
   const HRESULT error  


An error HRESULT.

true if the internal error state was changed; otherwise, false.

This operation modifies the error state only if the error state is already set to S_OK. This operation has no effect if the error state is already error, cancelled, completed, or closed.

Header: async.h

Namespace: Microsoft::WRL

AsyncBase Class