|
|
|
Messaging API (MAPI) |
|
MAPI is a messaging architecture that enables multiple applications to interact with multiple messaging systems seamlessly across a variety of hardware platforms.
The MAPI subsystem is made up of the MAPI spooler, a common user interface, and the programming interfaces. The MAPI spooler is a separate process responsible for sending messages to and receiving messages from a messaging system. The common user interface is a set of dialog boxes that gives client applications a consistent look and users a consistent way to work.
Client application writers have a choice of three other interfaces:
u
Simple MAPI. An API function-based client interface for applications written
in C, Microsoft Visual C++, or Microsoft Visual Basic.
u
Common Messaging Calls (CMC). An API function-based client interface for
applications written in C or C++.
u
CDO Library. An object-based client interface for applications written in C,
C++, Visual Basic, or Visual Basic for Applications. The Simple MAPI, CMC, and CDO Library client interfaces are primarily for messaging-aware and messaging-enabled client applications. These interfaces are less complex; applications that require fewer messaging features can use Simple MAPI, CMC, or the CDO Library to implement these features quickly and easily.
Important Common Messaging Calls (CMC) and Simple MAPI are not installed by Exchange Server 2003 or later. However, CMC and Simple MAPI are supported for use with Exchange 2003. To function properly, the underlying Exchange or Microsoft OutlookŪ MAPI subsystem must be properly installed on the client computer.
Client application writers have the option of making MAPI calls either directly through the MAPI programming interface or indirectly through one of these three client-only interfaces. Messaging can be implemented with a single MAPI client interface or a combination of interfaces. A single application can make calls to methods or functions belonging to any of the interfaces.
Differences between CDO, Simple MAPI, and Extended MAPI
Collaboration Data Objects (CDO) was originally called "OLE Messaging" and later "Active Messaging". CDO is a COM wrapper of the MAPI library and can be called from any development language that supports automation. CDO implements most but not all MAPI functionality, although far more than Simple MAPI.
CDO Components in
Windows
The Messaging Application Program Interface (MAPI) is an extensive set of functions that developers can use to create mail-enabled applications. The full function library is known as MAPI 1.0 or Extended MAPI. Extended MAPI allows complete control over the messaging system on the client computer, creation and management of messages, management of the client mailbox, service providers, and so forth.
Simple MAPI is a subset of 12 functions, which enable developers to add basic messaging functionality to their Windows-based applications.
The MAPI controls included with Microsoft Visual Basic (versions 3 through 6), and the version of MAPI installed by Outlook Express implement Simple MAPI only.
The Common Messaging Calls (CMC) client interface is a set of ten functions that enables you to add simple messaging capabilities to your client applications quickly. For example, your client can send a message with a single CMC function call and receive a message with two CMC function calls.
Important Common Messaging Calls (CMC) is not installed by Exchange Server 2003 or later. However, CMC is supported for use with Exchange 2003. To function properly, the underlying Exchange or Microsoft OutlookŪ MAPI subsystem must be properly installed on the client computer.
|
|
Extended MAPI Interfaces |
|
|
|
|
|
This section contains the reference for the Microsoft Windows Address Book (WAB) wrapper functioms for PowerBASIC.
|
|
CDO version 1.2.1 (CDO.DLL) |
|
Microsoft Collaboration Data Objects version 1.2.1 (CDO 1.2.1) is a technology for building messaging or collaboration applications. CDO 1.2.1 is designed to simplify the creation of applications with messaging functionality, or to add messaging functionality to existing applications. CDO 1.2.1 is implemented in CDO.DLL.
CDO 1.2 was first available with Microsoft Exchange 5.5 and Windows NTŪ version 4. As of December 2003, CDO 1.2.1 is provided in Microsoft Outlook 98 and 2000. CDO 1.2.1 is also provided in Exchange 2000 for backwards compatibility.
Note Documentation covering CDO for Windows NT Server (CDONTS) is provided inside the CDO 1.2.1 section of the MSDN Library. Whenever possible, newer applications should use CDO 1.2.1 or one of the other Exchange-specific CDO components instead of CDONTS.
Note for PowerBASIC programmers: CDO 1.2.1 only exposes dispatch interfaces, therefore you can only use it with Automation. However, his interfaces expose the MAPIOBJECT and RawTable properties, not available to Visual Basic programmers but accessible by compilers such PowerBASIC that can deal with IUnknown objects. The MAPIOBJECT property returns an IUnknown object that can be used to get references to Extended MAPI interfaces calling the QueryInterface method of the IUnknown interface. The RawTable property is an IUnknown object that returns an IMAPITable interface in response to QueryInterface. If your application uses any MAPIOBJECT or RawTable properties, it must Release them all before calling the Session object's Logoff method. Failure to do so can result in unexpected behavior. As the IUnknown object is returned in a Variant variable, and the Extended MAPI wrapper functions use pointers, you need to extract the address with VARIANT# and assign it to a DWORD variable.
Documentation: CDO 1.2.1
|
|
CDO for Windows 2000 (CDOSYS.DLL) |
|
CDOSYS is a proper subset of the functionality offered by CDO for Exchange 2000, so all applications will continue to function properly. When Microsoft Exchange 2000 is installed in a compiter running Microsoft Windows 2000. CDOSYS.DLL is unregistered from the system and COM runtime.
Both components share a common set of GUID values, interface definitions, module constants and so on. Applications do not need to be recompiled.
If you use TB_CDOEX.DLL to develop an application that will also run in Windows 2000 without Microsoft Exchange Server, you can only use the following ProgIDs, interfaces, collections, enumerations and events:
ProgIDs: CDO.Configuration.1, CDO.DropDirectory.1, CDO.Message.1. Interfaces: IBodyPart, IConfiguration, IDataSource, IDropDirectory, IMessage. Collections: IBodyParts, IMessages. Enumerations: CdoConfigSource, CdoDSNOptions, CdoEventStatus, CdoImportanceValues, CdoMessageStat, CdoMHTMLFlags, CdoNNTProcessingField, CdoPostUsing, CdoPriorityValues, CdoProtocolsAithentication, CdoReferenceType, CdoSendUsing, CdoSensitivityValues, CdoTimeZoneId.
Documentation: CDO for Windows 2000
|
|
TB_MAPIX v. 1.0 (Extended MAPI) |
|
TB_MAPIX.DLL is a library of wrapper functions that allow you to use the Extended MAPI and Windows Address Book interfaces in procedural form. The wrappers use direct VTable calls, the only way to do it since these interfaces derive directly from IUnknown and can't be used with Automation. The package also includes XCMC.INC, containing the constants, structures and function declarations to use CMC (Common Messaging Calls) with PowerBASIC.
Documentation:
Download:
|
|
TB_CDOEX v.1.0 (CDO for Exchange 2000 Server) |
|
CDO for Exchange
2000 Server (CDOEX) provides the fundamental Component Object Model
(COM) classes and interfaces that are used to manage most types of
information in the
Exchange store. The following
diagram illustrates the object model for CDO for Exchange 2000 Server
(CDOEX).
TB_CDOEX.DLL is a library of wrapper functions that allow you to use the CDO for Exchange Server 2000 Objects in procedural form with PowerBASIC Compiler for Windows 7.0+ or PowerBASIC Console Compiler 3.0+. As CDOEX works in combination with ADO, my library of wrappers for ADO, TB_ADO28.DLL, is the perfect partner.
Documentation:
Download:
|
|
TB_SMAPI v. 1.0 (Simple MAPI) |
|
Simple MAPI is a set of functions and related data structures you can use to add messaging functionality to your Windows applications.
The download includes TB_SMAPI.INC, an include file with the constants, structures and declares needed to use this API, and an small example that shows how to send an email with attachements with a single line of code.
Documentation:
Download:
|
|
TB_MAPIC v.1.0 (Microsoft MAPI Controls) |
|
Microsoft MAPI Controls (MSMAPI32.OCX) includes two MAPI controls, MAPISession and MAPIMessages.
The MAPISession control signs on and establishes a MAPI session. It is also used to sign off from a MAPI session. The MAPIMessages control allows the user to perform a variety of messaging system functions.
The MAPI controls are invisible at run time. In addition, there are no events for the controls. To use them, you must specify the appropriate methods.
TB_MAPIC is a library of wrapper functions that allow you to use the Microsoft MAPI Controls with the PowerBASIC compilers in procedural form.
Note If you attempt to run a program that uses the MAPI controls, make sure that you have the 32-bit MAPI DLLs installed properly or you may not be able to perform simple MAPI functions such as SignOn.
Documentation:
Documentation:
Download:
Download:
|
Page last updated on Friday, 20 July 2007 20:37:43 +0200