IMAPIForm::Advise
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.
Registers a form viewer for notifications about events that affect the form.
HRESULT Advise(
LPMAPIVIEWADVISESINK pAdvise,
ULONG FAR * pulConnection
);
Parameters
pAdvise
[in] A pointer to a view advise sink object to receive the subsequent notifications.pulConnection
[out] A pointer to a nonzero value that represents a successful notification registration.
Return Value
S_OK
The registration was successful.E_OUTOFMEMORY
The registration was unsuccessful because of insufficient memory.
Remarks
Form viewers call a form's IMAPIForm::Advise method to register for notification when changes occur to the form.
Notes to Implementers
Keep a copy of the view advise sink pointer passed in the pAdvise parameter so that you can use it to call the appropriate IMAPIViewAdviseSink method when an event occurs. Call the view advise sink's IUnknown::AddRef method to retain the pointer until notification registration is canceled. Set the contents of the pulConnection parameter to a nonzero number.
Many forms implement a helper object to handle the registration and subsequent notification of events.
For more information about the notification process in general, see Event Notification in MAPI.
For more information about notification and forms, see Sending and Receiving Form Notifications.
See Also
Reference
IMAPIViewAdviseSink : IUnknown