About Asynchronous Table Operations
The IMAPITable interface includes three methods that operate asynchronously and three methods for controlling an asynchronous operation. The following table lists these methods:
|Asynchronous operation||Asynchronous control method|
To retrieve status information about a table's type and current operation
Call IMAPITable::GetStatus. With GetStatus, a table user can determine whether the table is static or dynamic, if an operation is in progress or has completed, and if an error has occurred from a completed operation. For example, if a client needs to cancel a sort operation because it is taking too much time, the client can first call GetStatus to determine whether, in fact, a sort operation is presently processing. Then the client can call IMAPITable::Abort to stop it.
To suspend activity until an asynchronous task has completed
Call IMAPITable::WaitForCompletion. Calling WaitForCompletion allows the task to complete without interruption.