Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

AsyncBase Class

 

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 Class.

Implements the Windows Runtime asynchronous state machine.

  
template <  
   typename TComplete,  
   typename TProgress = Details::Nil,  
   AsyncResultType resultType = SingleResult  
>  
class AsyncBase : public AsyncBase< TComplete, Details::Nil, resultType >;  
  
template <  
   typename TComplete,  
   AsyncResultType resultType  
>  
class AsyncBase< TComplete, Details::Nil, resultType > : public Microsoft::WRL::Implements< IAsyncInfo >;  

Parameters

TComplete
An event handler that is called when an asynchronous operation completes.

TProgress
An event handler that is called when a running asynchronous operation reports the current progress of the operation.

resultType
One of the AsyncResultType enumeration values. By default, SingleResult.

Public Constructors

NameDescription
AsyncBase::AsyncBase ConstructorInitializes an instance of the AsyncBase class.

Public Methods

NameDescription
AsyncBase::Cancel MethodCancels an asynchronous operation.
AsyncBase::Close MethodCloses the asynchronous operation.
AsyncBase::FireCompletion MethodInvokes the completion event handler, or resets the internal progress delegate.
AsyncBase::FireProgress MethodInvokes the current progress event handler.
AsyncBase::get_ErrorCode MethodRetrieves the error code for the current asynchronous operation.
AsyncBase::get_Id MethodRetrieves the handle of the asynchronous operation.
AsyncBase::get_Status MethodRetrieves a value that indicates the status of the asynchronous operation.
AsyncBase::GetOnComplete MethodCopies the address of the current completion event handler to the specified variable.
AsyncBase::GetOnProgress MethodCopies the address of the current progress event handler to the specified variable.
AsyncBase::put_Id MethodSets the handle of the asynchronous operation.
AsyncBase::PutOnComplete MethodSets the address of the completion event handler to the specified value.
AsyncBase::PutOnProgress MethodSets the address of the progress event handler to the specified value.
AsyncBase::Start MethodStarts the asynchronous operation.

Protected Methods

NameDescription
AsyncBase::CheckValidStateForDelegateCall MethodTests whether delegate properties can be modified in the current asynchronous state.
AsyncBase::CheckValidStateForResultsCall MethodTests whether the results of an asynchronous operation can be collected in the current asynchronous state.
AsyncBase::ContinueAsyncOperation MethodDetermines whether the asynchronous operation should continue processing or should halt.
AsyncBase::CurrentStatus MethodRetrieves the status of the current asynchronous operation.
AsyncBase::ErrorCode MethodRetrieves the error code for the current asynchronous operation.
AsyncBase::OnCancel MethodWhen overridden in a derived class, cancels an asynchronous operation.
AsyncBase::OnClose MethodWhen overridden in a derived class, closes an asynchronous operation.
AsyncBase::OnStart MethodWhen overridden in a derived class, starts an asynchronous operation.
AsyncBase::TryTransitionToCompleted MethodIndicates whether the current asynchronous operation has completed.
AsyncBase::TryTransitionToError MethodIndicates whether the specified error code can modify the internal error state.

AsyncBase

AsyncBase

Header: async.h

Namespace: Microsoft::WRL

Microsoft::WRL Namespace

Show: