IMAPIFormAdviseSink::OnActivateNext

The IMAPIFormAdviseSink::OnActivateNext method identifies whether the current form object can handle the message class of the next message to display.

Quick Info

See IMAPIFormAdviseSink : IUnknown1PBDFMN.

 

HRESULT OnActivateNext(

    LPCSTR lpszMessageClass,

 

    ULONG ulMessageStatus,

 

    ULONG ulMessageFlags,

 

    LPPERSISTMESSAGE FAR * ppPersistMessage

 

   )

 

 

Parameters

lpszMessageClass

[in] Pointer to a string naming the message class of the next message.

ulMessageStatus

[in] Bitmask of client-defined or provider-defined flags   copied from the PR_MSG_STATUSTLWKUE property of the next message to display   that provides information on the state of the message.

ulMessageFlags

[in] Pointer to a bitmask of flags   copied from the PR_MESSAGE_FLAGS12X4D91 property of the next message to display   that indicates the current state of the message.

ppPersistMessage

[out] Pointer to a pointer to the form object used for the new form, if a new form is required. A pointer to NULL can be returned if the current form object can be used to display the next message.

 

Return Values

S_OK

The call succeeded and has returned the expected value or values.

S_FALSE

The form does not handle the message class.

 

Remarks

Form viewers call the IMAPIFormAdviseSink::OnActivateNext method to find out if the message class of a message can be handled by the current form object. The form object should return S_OK and NULL in the ppPersistMessage parameter if it can handle the message class. If it cannot, it should return S_FALSE.

If the form object can activate message classes other than the base class or the currently loaded class, it should return S_OK and a pointer to an implementation of the IPersistMessage interface the message class in the ppPersistMessage parameter. The message in question is then loaded by the form viewer using the IPersistMessage::Load10QIUGK method of that object.

See Also

IPersistMessage::Load