IMAPIInitMonitor::BeginWait
Applies to: Outlook 2016 | Outlook 2019
Start a wait for MAPI initialization or the specified number of milliseconds to elapse. This returns an IMAPIWaitResult interface which should have IMAPIWaitResult::End called in order initiate the wait. This allows the caller to control which thread is blocked while we are waiting.
HRESULT IMAPIInitMonitor::BeginWait(DWORD timeout, IMAPIWaitResult** ppResult)
Parameters
timeout
[in] The number of millisecond to wait for MAPI initialization, this can set to INFINITE to wait forever for the initialization to happen.
ppResult
[out] A pointer to recieve the newly create wait interface.
Return value
S_OK
A wait operation was successfully started.
E_OUTOFMEMORY
There was not enough memory to create a new object.
Remarks
This API provided the caller with an interface (which is thread-safe) which can be used initiate a blocking wait for MAPI initialization. This allows the consumer to deterime the best wait to wait for thier application. The behavior of calling IMAPIWaitResult::End is identical to calling IMAPIInitMonitor::Wait.