What Is CDO?

[Previous] [Next]

CDO is an object library that exposes the interfaces of the Messaging Application Programming Interface (MAPI), but instead of requiring the C/C++ language as MAPI does, CDO can be programmed using any development tool that creates COM objects, such as ASP, Visual Basic, and Microsoft Visual C++.

CDO has had several incarnations, and previous versions shipped with different names and functionality. For example, in Microsoft Exchange Server version 4.0, CDO was named OLE Messaging, and in Exchange Server 5.0, CDO was named Active Messaging. With the advent of Exchange Server version 5.5 and Microsoft Outlook 98, the library was renamed Collaboration Data Objects to better describe its services—CDO provides much more than messaging functionality. Even though the names have changed from version to version, any older applications using a previous version of CDO are compatible with the latest version of the library. (At the time this book goes to press, the latest released version of CDO is CDO for Microsoft Windows 2000.)

You install CDO by installing either Outlook on your machine or Outlook Web Access (OWA) on your Web server. CDO is actually divided into two dynamic link libraries (DLLs): CDO.dll and CDOHTML.dll. CDO.dll contains the core collaborative functionality of CDO, such as sending messages, accessing the directory, and viewing free/busy calendar information. CDOHTML.dll is the CDO Rendering library. This library allows you to automatically convert information stored inside Exchange Server to HTML by using custom views, colors, and formats. The CDO Rendering library is installed when you install OWA on your Web server. Throughout this chapter, you will learn how to use both CDO libraries in your applications.

CDO and the Outlook Object Library

CDO and the Outlook object library are complementary technologies. The Account Tracking application discussed in Chapter 6 illustrates how the CDO library is used in conjunction with the Outlook object library. You might be wondering when to use each library. To help you make a decision, take into consideration account criteria such as where the application will run and what type of information the application will access. As you develop applications, you will find that deciding whether to use the Outlook library or the CDO library will almost never be simple. Use the Outlook object library to do the following:

  • Access special information stored in Outlook, such as Tasks and Journal items, that CDO does not support
  • Open another user's information, such as the Calendar or Inbox
  • Sort or filter complex Outlook properties

Use the CDO library to do the following:

  • Render objects or data into HTML
  • Create multiuser server-based applications
  • Access detailed information stored in the directory or display address books for users to pick from

CDO and the CDO for Windows 2000

When you install Microsoft Internet Information Services (IIS) 5.0, you have the option to install an SMTP (Simple Mail Transfer Protocol) component and an NNTP (Network News Transfer Protocol) component on your Web server. These components are subsets, functionally, of the CDO library named Collaboration Data Objects for Windows 2000 (CDOSYS). The CDO for Windows 2000 library allows you to quickly build applications that do not require the complete functionality of CDO. For example, if on your Web page you wanted to create a simple way for users to send comments through e-mail, you would use the CDO for Windows 2000 object library rather than CDO. If your application required looking up a user in a directory server, however, you would want to use the advanced functionality of the full CDO library. Another difference between CDO and CDO for Windows 2000 is that CDO for Windows 2000 uses only SMTP and NNTP to communicate with a server. The use of these protocols to talk with the server limits the functionality that the CDO for Windows 2000 library can provide. With that said, you should use the CDO for Windows 2000 library to do the following:

  • Send unauthenticated e-mail from a Web page
  • Send bulk mailings via e-mail
  • Support MHTML (Mime HTML)

Use the CDO library to do the following:

  • Use authenticated or anonymous access to information, but not anonymous e-mails
  • Access or create calendaring information
  • Access a directory and its information


Programming Microsoft Outlook and Microsoft Exchange
Programming Microsoft Outlook and Microsoft Exchange, Second Edition (DV-MPS Programming)
ISBN: 0735610193
EAN: 2147483647
Year: 2000
Pages: 184

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net