This documentation is archived and is not being maintained.


Last modified: January 16, 2009

Applies to: Office 2010 | Outlook 2010 | Visual Studio

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.