CDO Messaging COM Interfaces
Topic Last Modified: 2004-06-08
The Microsoft Collaboration Data Object (CDO) for Microsoft® Windows® 2000 Component Object Model (COM) component defines several COM interfaces that are used to build messaging applications:
-
IBodyPart—defines abstract methods and properties that manage a body part of a message.
-
IMessage—defines abstract methods and properties that manage a complete message.
-
IDataSource
—defines abstract methods and properties that bind to and respectively, extract or embed messaging data to or from other objects.
-
IDropDirectory
—defines a method that accesses messages stored on the file system, such as the Windows 2000 Simple Mail Transfer Protocol (SMTP) drop directory.
-
IMessages
—defines a collection interface that manages a set of messages accessed on the file system.
-
IBodyParts
—defines a collection interface that manages a collection of body parts.
Each interface extends the IDispatch COM interface and is marked as dual. This means that both a true COM interface (virtual table) and a dispinterface (IDispatch) are available to communicate with objects that expose the above interfaces. Programming languages such as Microsoft® Visual C++®, Microsoft® Visual Basic® (including Visual Basic, Scripting Edition), Microsoft® Visual J++®, and Microsoft® JScript® can access objects using CDO interfaces.
Other interfaces listed in the reference section of this documentation are used when constructing SMTP and Network News Transfer Protocol (NNTP) transport event sinks. These interfaces include:
Note With CDO for Windows 2000, understanding the distinction between a COM interface and a COM class is essential, because many objects in CDO expose multiple interfaces that are compatible with Automation. In CDO for Windows 2000, this is true only for instances of the Message COM class. In future versions of CDO, this distinction will play a more important role in the object model.
For more information, see SMTP/NNTP Transport Event Sinks with CDO.