Implementing a Logon Object
Applies to: Outlook 2013 | Outlook 2016
Every address book, message store, and transport provider instantiates a logon object as part of its implementation of IABProvider::Logon, IMSProvider::Logon, or IXPProvider::TransportLogon. Logon objects implement methods that help MAPI service client requests. Depending on your type of service provider, your logon object will support one of the following interfaces.
Logon object interface | Service provider |
---|---|
IABLogon : IUnknown |
Address book provider |
IMSLogon : IUnknown |
Message store provider |
IXPLogon : IUnknown |
Transport provider |
Address book and message store providers implement the following features in their logon objects:
Support for event notification (Advise and Unadvise methods). For an overview of event notification, see Event Notification in MAPI. For more information about supporting notification in your logon object, see Supporting Event Notification.
Entry identifier comparison (CompareEntryIDs method). For general information about entry identifiers, see MAPI Entry Identifiers. For more information about comparing entry identifiers in your logon object's CompareEntryIDs method, see Supporting Object Access and Comparison.
Access to additional error information (GetLastError method). For more information about handling errors in MAPI, see Error Handling in MAPI.
Access to objects implemented by the service provider (OpenEntry method). For more information, see Supporting Object Access and Comparison.
Access to a status object (OpenStatusEntry method). For general information about status objects, see MAPI Status Objects. For specific information about implementing a status object, see Status Object Implementation.
A logoff process (Logoff method). For more information, see Shutting Down a Service Provider.
If your provider is an address book provider, you will also implement the following methods and associated features:
IABLogon::GetOneOffTable to provide a listing of the templates that you support for creating new recipients. For more information, see One-Off Tables or Implementing a Provider One-Off Table.
IABLogon::OpenTemplateID to provide access to the implementation of a recipient whose data resides in a host address book provider. For more information, see Acting as a Foreign Address Book Provider.
IABLogon::PrepareRecips to ensure that the appropriate properties are available for all of the recipients in a recipient list. For more information, see IABLogon::PrepareRecips.
A transport provider's logon object, which implements IXPLogon : IUnknown, is quite different from the logon objects implemented by the other types of service providers. It has only two features in common with the other logon objects: access to a status object through the IXPLogon::OpenStatusEntry method and a logoff operation through the IXPLogon::TransportLogoff method. Transport providers implement the following unique features in their logon objects:
Registration for address types (IXPLogon::AddressTypes method). For more information about registering an address type, see Transport Provider and MAPI Spooler Operational Model.
Control of message transmission (IXPLogon::StartMessage, IXPLogon::EndMessage, and IXPLogon::SubmitMessage methods). For more information, see Message Reception Model, Interacting with the MAPI Spooler, and Message Submission Model.
Internal state validation (IXPLogon::ValidateState method).
Ability to download or upload messages on demand (IXPLogon::FlushQueues method). For more information, see Implementing the FlushQueues Method.
Ability to query for pending messages (IXPLogon::Poll method). For more information, see Message Reception Model.
Idle state detection (IXPLogon::Idle method).
Interaction with the MAPI spooler (IXPLogon::TransportNotify method).