The IMAPISession::PrepareForm method creates a numeric token to be used by the IMAPISession::ShowForm method to access a message.
HRESULT PrepareForm(
  LPCIID lpInterface,           
  LPMESSAGE lpMessage,          
  ULONG FAR * lpulMessageToken  
);
 
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::ShowForm.
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.