Chapter 2. MAPI

The Messaging Application Programming Interface (MAPI) specification was written in collaboration with more than 100 software vendors, and therefore (theoretically) it represents an industry-wide consensus on the features that should be supported by messaging platforms. Of the messaging choices available on the Microsoft Windows platforms, MAPI has the richest feature set and is the most flexible.

Although “API” is part of MAPI’s name, it’s not an API, or Application Programming Interface, in the way that Windows programmers usually think of that term. While many other APIs expose their capabilities through function libraries, MAPI is object-oriented. MAPI uses Microsoft’s Component Object Model (COM) to provide a way to instantiate messaging objects, which in turn expose methods that can be called to manipulate those objects. I’ll explain COM later in the book, when we need it to understand the structure of Collaboration Data Objects (CDO). For now, it’s enough to note that MAPI uses COM features that aren’t supported by Visual Basic, so it’s not possible to program MAPI directly from Visual Basic. So why have a chapter on MAPI if it can’t be used directly from Visual Basic? The reason is that MAPI is the foundation for many messaging technologies that are accessible to Visual Basic, including CDO. To fully understand CDO and other MAPI-based technologies, it is necessary to understand MAPI.

In addition to a survey of MAPI architecture, this chapter provides information ...

Get CDO & MAPI Programming with Visual Basic: now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.