This documentation is archived and is not being maintained.


This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

Suspends processing until one or more asynchronous operations in progress on the table have completed.

HRESULT WaitForCompletion(
ULONG ulFlags,
ULONG ulTimeout,
ULONG FAR * lpulTableStatus


Reserved; must be zero.


[in] Maximum number of milliseconds to wait for the asynchronous operation or operations to complete. To wait indefinitely until completion occurs, set ulTimeout to 0xFFFFFFFF.


[in, out] On input, either a valid pointer or NULL. On output, if lpulTableStatus is a valid pointer, it points to the most recent status of the table. If lpulTableStatus is NULL, no status information is returned. If WaitForCompletion returns an unsuccessful HRESULT value, the contents of lpulTableStatus are undefined.


The wait operation was successful.


The table does not support waiting for the completion of asynchronous operations.


The asynchronous operation or operations did not complete in the specified time.

The IMAPITable::WaitForCompletion method suspends processing until any asynchronous operations currently under way for the table have completed. WaitForCompletion can allow the asynchronous operations either to fully complete or to run for a certain number of milliseconds, as indicated by ulTimeout, before being interrupted. To detect asynchronous operations in progress, call the IMAPITable::GetStatus method.