共用方式為


IMAPISession : IUnknown

Applies to: Office 2010 | Outlook 2010 | Visual Studio

Manages objects associated with a MAPI logon session.

Header file:

Mapix.h

Exposed by:

Session objects

Implemented by:

MAPI

Called by:

Client applications and MAPI

Interface identifier:

IID_IMAPISession

Pointer type:

LPMAPISESSION

Vtable Order

GetLastError

Returns a MAPIERROR structure that contains information about the previous session error.

GetMsgStoresTable

Provides access to the message store table that contains information about all the message stores in the session profile.

OpenMsgStore

Opens a message store and returns an IMsgStore pointer for further access.

OpenAddressBook

Opens the MAPI integrated address book, returning an IAddrBook pointer for further access.

OpenProfileSection

Opens a section of the current profile and returns an IProfSect pointer for further access.

GetStatusTable

Provides access to the status table, a table that contains information about all the MAPI resources in the session.

OpenEntry

Opens an object and returns an interface pointer for further access.

CompareEntryIDs

Compares two entry identifiers to determine whether they refer to the same object.

Advise

Registers to receive notification of specified events that affect the session.

Unadvise

Cancels the sending of notifications previously set up with a call to the Advise method.

MessageOptions

Not supported or documented.

QueryDefaultMessageOpt

Not supported or documented.

EnumAdrTypes

Deprecated. Returns the address types that can be handled by all of the transport providers in the session.

QueryIdentity

Returns the entry identifier of the object that provides the primary identity for the session.

Logoff

Ends a MAPI session.

SetDefaultStore

Establishes a message store as the default message store for the session.

AdminServices

Returns an IMsgServiceAdmin pointer for making changes to message services.

ShowForm

Displays a form.

PrepareForm

Creates a numeric token that the ShowForm method uses to access a message.

See Also

Concepts

MAPI Interfaces