IMAPIViewContext::SetAdviseSink

The IMAPIViewContext::SetAdviseSink method manages a form's registration to receive notifications about changes in the viewer.

Quick Info

See IMAPIViewContext : IUnknown.

HRESULT SetAdviseSink(
  LPMAPIFORMADVISESINK pmvns  
);
 

Parameters

pmvns
[in] Pointer to a form advise sink object or NULL.

Return Value

S_OK
The registration or cancellation for form notification succeeded.

Remarks

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.

Notes to Implementers

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.