共用方式為


IMAPITable::WaitForCompletion

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
);

Parameters

  • ulFlags
    Reserved; must be zero.

  • ulTimeout
    [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.

  • lpulTableStatus
    [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.

Return Value

  • S_OK
    The wait operation was successful.

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

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

Remarks

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.

See Also

Reference

IMAPITable::GetRowCount

IMAPITable::GetStatus

IMAPITable::Restrict

IMAPITable::SetColumns

IMAPITable::SortTable

IMAPITable : IUnknown