Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

CloseIMsgSession

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.

Closes a message session and all the messages created within that session.

Header file:

Imessage.h

Implemented by:

MAPI

Called by:

Client applications and service providers

VOID CloseIMsgSession(
  LPMSGSESS lpMsgSess
);

lpMsgSess

[in] Pointer to the message session object obtained using the OpenIMsgSession function at the start of the message session.

A message session is used by client applications and service providers that want to deal with several related MAPI IMessage objects built on top of underlying OLE IStorage objects. The client or provider uses the OpenIMsgSession and CloseIMsgSession functions to wrap the creation of such messages inside a message session. Once the message session is opened, the client or provider passes a pointer to it in a call to OpenIMsgOnIStg to create a new IMessage-on-IStorage object.

A message session keeps track of all IMessage-on-IStorage objects opened during the duration of the session, in addition to all the attachments and other properties of the messages. When a client or provider calls CloseIMsgSession, it closes all these objects. Calling CloseIMsgSession is the only way to close IMessage-on-IStorage objects.

Show:
© 2015 Microsoft