The IMAPIViewContext::SetAdviseSink method manages a form's registration to receive notifications about changes in the viewer.
See IMAPIViewContext : IUnknown.
HRESULT SetAdviseSink(
LPMAPIFORMADVISESINK pmvns
);
Form objects call the IMAPIViewContext::SetAdviseSink method to either register to learn about changes in the form viewer or cancel a prior registration. When pmvns is set to NULL, the form wants to cancel a registration. When pmvns points to a valid form advise sink, the form wants to register for future notifications.
When SetAdviseSink includes a form advise sink pointer, keep a reference to it until another SetAdviseSink call is made to cancel notification. Send a notification when a change occurs in your viewer and when you are loading a new message.
For more information, see Sending and Receiving Form Notifications.