IMAPIInitMonitor::Wait

Applies to: Outlook 2013 | Outlook 2016 | Outlook 2019

Initiates a BLOCKING call on this thread, which will return either when the specified number of milliseconds have elapsed or MAPI has been initialized. INFINITE can be used to for an infinite wait.

HRESULT IMAPIInitMonitor::Wait(DWORD timeout)

Parameters

timeout

[in] The number of milliseconds to wait for MAPI to be initialized, you can pass INFINITE (0xFFFFFFFF) to wait forever.

Return value

S_OK

MAPI has been initialized successfully.

HRESULT_FROM_WIN32(ERROR_TIMEOUT)

When given a non-infinite timeout this indicates MAPI was not initialized during that period.

See also

IMAPIInitMonitor

IMAPIInitMonitor::IsInitialized

IMAPIInitMonitor::BeginWait

CreateMAPIInitializationMonitor

IMAPIWaitResult