Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

HrDispatchNotifications

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.

Forces dispatching of all queued notifications.

Header file:

Mapiutil.h

Implemented by:

MAPI

Called by:

Client applications and service providers

HRESULT HrDispatchNotifications(
  ULONG ulFlags
);

ulFlags

[in] Reserved; must be zero.

S_OK

All queued notifications have been dispatched.

MAPI_E_USER_CANCEL

WM_QUIT, WM_QUERYENDSESSION, or WM_ENDSESSION was received.

MAPI_E_NOT_INITIALIZED

MAPI was not initialized.

The HrDispatchNotifications function causes MAPI to dispatch all notifications that are currently queued in the MAPI notification engine without waiting for a message dispatch. This can have a beneficial effect on memory utilization. For more information, see Forcing a Notification.

Some applications wait for a notification message in a timeout loop using the Windows PeekMessage and DispatchMessage functions. On all but the fastest platforms, such applications might experience poor performance or even blockage of notifications. Using HrDispatchNotifications not only reduces code but improves performance.

Show:
© 2014 Microsoft