OpenIMsgSession 

The OpenIMsgSession function groups the creation of messages within a session, so that closing the session also closes all messages created within that session.

 

Note  This function may not be supported in future versions of MAPI.

 

Quick Info

Header file:

IMESSAGE.H

Implemented by:

MAPI

Called by:

Client applications and service providers

 

SCODE OpenIMsgSession(

    LPMALLOC lpMalloc,

 

    ULONG ulFlags,

 

    LPMSGSESS FAR * lppMsgSess

 

   );

 

 

Parameters

lpMalloc

[in] Pointer to a memory allocator object exposing the OLE IMalloc interface. The client application may need to use this allocation method when working with certain interfaces such as IStream.

ulFlags

Reserved; must be zero.

lppMsgSess

[out] Pointer to the returned message-session object.

 

Remarks

To establish a message session, a client application should call the OpenIMsgSession function to obtain a message session pointer before calling the OpenIMsgOnIStg29DYEH function for the first time to create a new message object. When finished with a message session, the client should call the CloseIMsgSession5AYO_I_ function to end it.

OpenIMsgSession is used by clients that require the ability to handle several related messages as storage objects. If only a single message is to be open at a time, a client does not need to track multiple messages. In this case, it has little cause to create a message session and no reason to call OpenIMsgSession.

For more information on the use of OLE memory allocators, see Inside OLE, Second Edition, by Kraig Brockschmidt, and the OLE Programmer s Reference.

See Also

IMAPISession : IUnknown