IMAPISession::PrepareForm

The IMAPISession::PrepareForm method creates a numeric token to be used by the IMAPISession::ShowFormF1MMN4 method to access a message.

Quick Info

See IMAPISession : IUnknown2MVW67N.

 

HRESULT PrepareForm(

    LPCIID lpInterface,

 

    LPMESSAGE lpMessage,

 

    ULONG FAR * lpulMessageToken

 

   )

 

 

Parameters

lpInterface

[in] Pointer to the interface identifier (IID) representing the interface to be used to access the message. Passing NULL results in the standard interface, or IMessage, being used. The lpInterface parameter must be NULL or IID_IMessage.

lpMessage

[in] Pointer to the message to be displayed in the form.

lpulMessageToken

[out] Pointer to a message token, which is used by the IMAPISession::ShowForm method to access the message pointed to by lpMessage.

 

Return Values

S_OK

The form preparation was successful.

 

Remarks

The IMAPISession::PrepareForm method creates a message token for the message pointed to by the lpMessage parameter and calls the message s IUnknown::AddRef method. This token is passed in the ulMessageToken parameter to IMAPISession::ShowFormF1MMN4.

Notes to Callers

If the call to PrepareForm succeeds, release the message pointed to by lpMessage by calling its IUnknown::Release method before calling ShowForm. Failure to release the message before calling ShowForm can cause memory leaks.

See Also

IMAPISession::ShowForm