Skip to content

Latest commit

 

History

History
29 lines (17 loc) · 1.25 KB

forcing-a-notification.md

File metadata and controls

29 lines (17 loc) · 1.25 KB
title manager ms.date ms.audience ms.localizationpriority api_type ms.assetid
Forcing a Notification
lindalu
11/16/2014
Developer
medium
COM
9c7d6605-73ee-468c-981b-e0853106c9ba

Forcing a Notification

Applies to: Outlook 2013 | Outlook 2016

When service providers use the IMAPISupport : IUnknown methods for notification, MAPI delivers notifications using a hidden window and its corresponding window procedure. For each process to receive a notification, MAPI posts a special message to the hidden window. This message is named with the constant szMAPINotificationMsg which is defined in MAPIDEFS.H.

You receive these notifications when the hidden window's window procedure processes the szMAPINotificationMsg message. To guarantee that notifications are delivered, it is necessary to wait for and dispatch this szMAPINotificationMsg message. Implementing the logic to achieve this can be done fairly simply, but MAPI provides an entry point into the MAPI DLL called HrDispatchNotifications to make processing even simpler. Call HrDispatchNotifications as follows to receive notifications in your client:

HRESULT hr = HrDispatchNotifications(0);