Programming Microsoft Outlook and Microsoft Exchange, Second Edition (DV-MPS Programming)

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 version 1.21.)

You install CDO by installing either Outlook 98 on your machine or Outlook Web Access on your web server. CDO is actually divided into two 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 Outlook Web Access 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 7 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:

Use the CDO library to do the following:

CDO and the CDO for NTS Library

When you install Microsoft Internet Information Server (IIS) 4.0, you have the option to install an SMTP component and an NNTP component on your web server. These components are subsets, functionally, of the CDO library named CDO for NTS. The CDO for NTS 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 build a simple way for users to send comments through e-mail, you would use the CDO for NTS 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 NTS is that CDO for NTS 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 NTS library can provide. With that said, you should use the CDO for NTS library to do the following:

Use the CDO library to do the following:

Категории