Platform SDK: MAPI

About Service Provider Objects

Service providers implement many objects, some that are used primarily by MAPI and some that are used by client applications. A few objects are implemented by all types of service providers; the rest are specific to a single provider type. The following table describes all of the service provider objects.

Service provider object Description
Address book container Contains recipient information for one address book provider in the active profile; address book providers can have one or more address book containers.
Attachment Contains additional data, such as a file or OLE object, to be associated with a message.
Control Enables or disables a button and initiates processing when the button is clicked.
Distribution list Describes a grouping of individual message recipients.
Folder Contains messages and other message containers.
Logon Handles service provider event notification and client requests.
Messaging user Describes an individual recipient of a message.
Message Contains information that can be sent to one or more recipients with a messaging system.
Message store Acts as a database of messages, organized hierarchically.
Provider Handles service provider startup and shutdown.
Spooler hook Performs special processing on inbound and outbound messages.
Status Provides access to the service provider's state.
Table Provides access to a summary view of object data in row and column format, similar to a database table.

All service providers implement a provider object and a logon object. Provider objects are strictly for bookkeeping; they are used by MAPI to control the start up and shutdown processes. Logon objects service some client requests indirectly. For example, the message store provider's logon object handles notification registration and requests to open message store objects.

Provider and logon objects implement a different interface depending on the type of service provider supplying the implementation. A message store provider implements the IMSProvider and IMSLogon interfaces in its provider and logon objects, an address book provider implements the IABProvider and IABLogon interfaces, and a transport provider implements the IXPProvider and IXPLogon interfaces.

Message hook providers implement spooler hook objects, or objects that filter inbound and outbound messages.

Service providers typically use only a few objects. Most frequently, they use a support object provided by MAPI that helps implement client requests. The support object is customized for the type of provider using it. For all service providers, the support object includes methods for handling event notification, displaying configuration properties, opening objects, and error handling. The rest of the methods are specific to its use; there are customized versions for address book, message store, and transport providers and for configuration support. For example, the address book support object displays details and custom recipient dialog boxes. The message store support object supports copy and move operations for folders and messages. The transport provider support object includes methods for facilitating interaction with the MAPI spooler.

Some service providers use table data and property data objects — utility objects implemented by MAPI. Table data objects enable service providers to manage the underlying data of a table. Property data objects enable service providers to set object and property access.

Transport providers that support the Transport-Neutral Encapsulation Format (TNEF) for transferring properties use a Tnef object implemented by MAPI that supports the ITnef interface. For more information, see Developing a TNEF-Enabled Transport Provider.